------------------------------------------------------------ revno: 12363 revision-id: squid3@treenet.co.nz-20121016234001-sh9frwo38p21n9p2 parent: squid3@treenet.co.nz-20121013060711-ynmigg93s2ywvpun author: Francesco Chemolli committer: Amos Jeffries branch nick: 3.3 timestamp: Tue 2012-10-16 17:40:01 -0600 message: Static Code Analysis: varargs cleanup, improvements to readability ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121016234001-sh9frwo38p21n9p2 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: b05abca4c0d3047a8d613c4a8913a32490b168b1 # timestamp: 2012-10-16 23:44:11 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121013060711-\ # ynmigg93s2ywvpun # # Begin patch === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2012-09-25 15:36:18 +0000 +++ src/cache_cf.cc 2012-10-16 23:40:01 +0000 @@ -3665,7 +3665,7 @@ if (t) { ++t; s->tcp_keepalive.timeout = atoi(t); - t = strchr(t, ','); + // t = strchr(t, ','); // not really needed, left in as documentation } #if USE_SSL } else if (strcasecmp(token, "sslBump") == 0) { === modified file 'src/ftp.cc' --- src/ftp.cc 2012-09-04 09:10:20 +0000 +++ src/ftp.cc 2012-10-16 23:40:01 +0000 @@ -3774,6 +3774,7 @@ buf[0] = '\0'; vsnprintf(buf, 4096, fmt, args); writeReplyBody(buf, strlen(buf)); + va_end(args); } /** === modified file 'src/snmp_core.cc' --- src/snmp_core.cc 2012-09-22 15:07:57 +0000 +++ src/snmp_core.cc 2012-10-16 23:40:01 +0000 @@ -1039,6 +1039,7 @@ } } + va_end(args); return (entry); } /* End of tree utility functions */ @@ -1062,6 +1063,7 @@ } } + va_end(args); return (new_oid); } === modified file 'src/stmem.cc' --- src/stmem.cc 2012-09-01 14:38:36 +0000 +++ src/stmem.cc 2012-10-16 23:40:01 +0000 @@ -104,8 +104,7 @@ mem_hdr::freeDataUpto(int64_t target_offset) { /* keep the last one to avoid change to other part of code */ - - SplayNode const * theStart = nodes.start(); + SplayNode const * theStart; while ((theStart = nodes.start())) { if (theStart == nodes.finish()) === modified file 'src/url.cc' --- src/url.cc 2012-09-04 09:10:20 +0000 +++ src/url.cc 2012-10-16 23:40:01 +0000 @@ -311,7 +311,8 @@ port = urlDefaultPort(protocol); /* Is there any login information? (we should eventually parse it above) */ - if ((t = strrchr(host, '@'))) { + t = strrchr(host, '@'); + if (t != NULL) { strcpy((char *) login, (char *) host); t = strrchr(login, '@'); *t = 0;