[asterisk-commits] kpfleming: branch 1.4 r152811 - /branches/1.4/main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 30 11:53:49 CDT 2008


Author: kpfleming
Date: Thu Oct 30 11:53:48 2008
New Revision: 152811

URL: http://svn.digium.com/view/asterisk?view=rev&rev=152811
Log:
instead of comparing the string pointer to 0, let's compare the value that was actually parsed out of the string (found by sparse)


Modified:
    branches/1.4/main/cdr.c

Modified: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=152811&r1=152810&r2=152811
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Thu Oct 30 11:53:48 2008
@@ -1395,7 +1395,7 @@
 		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 @@
 		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;




More information about the asterisk-commits mailing list