aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_sqlite.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-31 14:22:27 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-31 14:22:27 +0000
commit8dfa2c4b3ca895b33d05331aae24ee342a6d23a3 (patch)
treece74488a1c46e0584bc52598feb09c1ca7adf5da /res/res_config_sqlite.c
parent98197a94a97c33f3a5b0f951d13fe0ecbcd92c8c (diff)
Merged revisions 111961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r111961 | file | 2008-03-31 11:20:39 -0300 (Mon, 31 Mar 2008) | 4 lines Initialize all these here tmp pointers at declaration. They confused some compilers a wee bit. (closes issue #12333) Reported by: ovi ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@111962 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_sqlite.c')
-rw-r--r--res/res_config_sqlite.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c
index 7eea32af8..a2c72d182 100644
--- a/res/res_config_sqlite.c
+++ b/res/res_config_sqlite.c
@@ -1204,8 +1204,9 @@ static int realtime_update_handler(const char *database, const char *table,
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 @@ static int realtime_store_handler(const char *database, const char *table, va_li
#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]);