[asterisk-commits] file: trunk r111961 - /trunk/res/res_config_sqlite.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 31 09:20:39 CDT 2008


Author: file
Date: Mon Mar 31 09:20:39 2008
New Revision: 111961

URL: http://svn.digium.com/view/asterisk?view=rev&rev=111961
Log:
Initialize all these here tmp pointers at declaration. They confused some compilers a wee bit.
(closes issue #12333)
Reported by: ovi

Modified:
    trunk/res/res_config_sqlite.c

Modified: trunk/res/res_config_sqlite.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_sqlite.c?view=diff&rev=111961&r1=111960&r2=111961
==============================================================================
--- trunk/res/res_config_sqlite.c (original)
+++ trunk/res/res_config_sqlite.c Mon Mar 31 09:20:39 2008
@@ -1204,8 +1204,9 @@
 	return rows_num;
 }
 
-static int realtime_store_handler(const char *database, const char *table, va_list ap) {
-	char *errormsg, *tmp_str, *tmp_keys, *tmp_keys2, *tmp_vals, *tmp_vals2;
+static int realtime_store_handler(const char *database, const char *table, va_list ap)
+{
+	char *errormsg, *tmp_str, *tmp_keys = NULL, *tmp_keys2 = NULL, *tmp_vals = NULL, *tmp_vals2 = NULL;
 	const char **params, **vals;
 	size_t params_count;
 	int error, rows_id;
@@ -1224,8 +1225,6 @@
 #define QUERY "INSERT into '%q' (%s) VALUES (%s);"
 /* \endcond */
 
-	tmp_keys2 = NULL;
-	tmp_vals2 = NULL;
 	for (i = 0; i < params_count; i++) {
 		if ( tmp_keys2 ) {
 			tmp_keys = sqlite_mprintf("%s, %q", tmp_keys2, params[i]);




More information about the asterisk-commits mailing list