diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-30 16:53:48 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-30 16:53:48 +0000 |
commit | 9b95fd5d33881f31c092b000dabc0806c0914fb7 (patch) | |
tree | a4d261e8b45a3879e86258a4b25b3c11153f8d06 /main/cdr.c | |
parent | ff984e5f208a98d4e2916f2f027fd6b7ec6e5005 (diff) |
instead of comparing the string pointer to 0, let's compare the value that was actually parsed out of the string (found by sparse)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@152811 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/cdr.c b/main/cdr.c index 3386f87e2..353ff97c8 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1395,7 +1395,7 @@ static int do_reload(void) if ((size_value = ast_variable_retrieve(config, "general", "size"))) { if (sscanf(size_value, "%d", &cfg_size) < 1) ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", size_value); - else if (size_value < 0) + else if (cfg_size < 0) ast_log(LOG_WARNING, "Invalid maximum batch size '%d' specified, using default\n", cfg_size); else batchsize = cfg_size; @@ -1403,7 +1403,7 @@ static int do_reload(void) if ((time_value = ast_variable_retrieve(config, "general", "time"))) { if (sscanf(time_value, "%d", &cfg_time) < 1) ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", time_value); - else if (time_value < 0) + else if (cfg_time < 0) ast_log(LOG_WARNING, "Invalid maximum batch time '%d' specified, using default\n", cfg_time); else batchtime = cfg_time; |