aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-28 14:53:58 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-28 14:53:58 +0400
commit54e84de2f56dd7d8b04627e2c13bad123832ed81 (patch)
tree3837d86eb89a5a63a2b421dc270c7e044086d1bc /src/cfg_utils.c
parente389ab727d6eb1024567c2629150a72fc26fb7ef (diff)
downloadrspamd-54e84de2f56dd7d8b04627e2c13bad123832ed81.tar.gz
rspamd-54e84de2f56dd7d8b04627e2c13bad123832ed81.zip
Parse big limits on 32 bits machine (for file sizes).
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index c872583f2..28430df14 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -300,10 +300,10 @@ get_module_opt (struct config_file *cfg, gchar *module_name, gchar *opt_name)
return NULL;
}
-gsize
+guint64
parse_limit (const gchar *limit, guint len)
{
- gsize result = 0;
+ guint64 result = 0;
const gchar *err_str;
if (!limit || *limit == '\0' || len == 0) {
@@ -311,7 +311,7 @@ parse_limit (const gchar *limit, guint len)
}
errno = 0;
- result = strtoul (limit, (gchar **)&err_str, 10);
+ result = strtoull (limit, (gchar **)&err_str, 10);
if (*err_str != '\0') {
/* Megabytes */