From f231570ed77adb9fe813e7ada91cd9e789bd529a Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 24 Dec 2010 17:58:30 +0000 Subject: [PATCH] Reset 'first' variable after usage. (closes issue #18525) Reported by: makoto Patches: res-config-mysql-update2.patch uploaded by makoto (license 38) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299583 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- addons/res_config_mysql.c | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c index a626ffd3ee..93a743245d 100644 --- a/addons/res_config_mysql.c +++ b/addons/res_config_mysql.c @@ -745,6 +745,7 @@ static int update2_mysql(const char *database, const char *tablename, va_list ap ESCAPE_STRING(buf, newval); ast_str_append(&sql, 0, "%s %s = '%s'", first ? "" : ",", newparam, ast_str_buffer(buf)); + first = 0; /* If the column length isn't long enough, give a chance to lengthen it. */ if (strncmp(column->type, "char", 4) == 0 || strncmp(column->type, "varchar", 7) == 0) {