------------------------------------------------------------ revno: 11684 revision-id: squid3@treenet.co.nz-20121017003925-pqrs38f5ldmksy22 parent: squid3@treenet.co.nz-20121017003247-xhjarx67yzkezl6y author: Francesco Chemolli committer: Amos Jeffries branch nick: 3.2 timestamp: Tue 2012-10-16 18:39:25 -0600 message: Static Code Analysis: varargs cleanup, improvements to readability ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121017003925-pqrs38f5ldmksy22 # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: 4d252181dd7505de18e83707bb9396ea9fa585f7 # timestamp: 2012-10-17 00:44:24 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # base_revision_id: squid3@treenet.co.nz-20121017003247-\ # xhjarx67yzkezl6y # # Begin patch === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2012-07-28 05:38:50 +0000 +++ src/cache_cf.cc 2012-10-17 00:39:25 +0000 @@ -3636,7 +3636,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-07-28 05:38:50 +0000 +++ src/ftp.cc 2012-10-17 00:39:25 +0000 @@ -3768,6 +3768,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-07-28 05:38:50 +0000 +++ src/snmp_core.cc 2012-10-17 00:39:25 +0000 @@ -1036,6 +1036,7 @@ } } + va_end(args); return (entry); } /* End of tree utility functions */ @@ -1059,6 +1060,7 @@ } } + va_end(args); return (new_oid); } === modified file 'src/stmem.cc' --- src/stmem.cc 2012-02-05 06:09:46 +0000 +++ src/stmem.cc 2012-10-17 00:39:25 +0000 @@ -105,8 +105,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-07-28 05:38:50 +0000 +++ src/url.cc 2012-10-17 00:39:25 +0000 @@ -310,7 +310,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;