=== modified file 'compat/strnstr.cc' --- compat/strnstr.cc 2012-01-20 18:55:04 +0000 +++ compat/strnstr.cc 2012-06-28 06:57:58 +0000 @@ -87,7 +87,7 @@ if (len > slen) return (NULL); } while (strncmp(s, find, len) != 0); - s--; + --s; } return s; } === modified file 'compat/xalloc.cc' --- compat/xalloc.cc 2012-01-20 18:55:04 +0000 +++ compat/xalloc.cc 2012-07-02 08:15:18 +0000 @@ -28,7 +28,7 @@ static void stat_init(void) { - for (int i = 0; i <= XMS_DBG_MAXINDEX; i++) + for (int i = 0; i <= XMS_DBG_MAXINDEX; ++i) malloc_sizes[i] = malloc_histo[i] = 0; dbg_stat_init = 1; === modified file 'compat/xstrerror.cc' --- compat/xstrerror.cc 2012-01-20 18:55:04 +0000 +++ compat/xstrerror.cc 2012-07-02 08:15:27 +0000 @@ -83,7 +83,7 @@ #if _SQUID_WINDOWS_ // Description of WSAGetLastError() - for (size_t i = 0; i < sizeof(_wsaerrtext) / sizeof(struct _wsaerrtext); i++) { + for (size_t i = 0; i < sizeof(_wsaerrtext) / sizeof(struct _wsaerrtext); ++i) { if (_wsaerrtext[i].err == error) { // small optimization, save using a temporary buffer and two copies... snprintf(xstrerror_buf, BUFSIZ, "(%d) %s, %s", error, _wsaerrtext[i].errconst, _wsaerrtext[i].errdesc); === modified file 'helpers/basic_auth/LDAP/basic_ldap_auth.cc' --- helpers/basic_auth/LDAP/basic_ldap_auth.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/LDAP/basic_ldap_auth.cc 2012-06-28 07:05:19 +0000 @@ -267,7 +267,7 @@ sslpath); exit(1); } else { - sslinit++; + ++sslinit; } if ((ld = ldapssl_init(ldapServer, port, 1)) == NULL) { fprintf(stderr, "\nUnable to connect to SSL LDAP server: %s port:%d\n", @@ -332,7 +332,7 @@ if (p[0] != ' ') return 0; } - p++; + ++p; } /* Trailing whitespace? */ if (xisspace(p[0])) @@ -368,14 +368,14 @@ value = argv[1] + 2; } else if (argc > 2) { value = argv[2]; - argv++; - argc--; + ++argv; + --argc; } else value = ""; break; } - argv++; - argc--; + ++argv; + --argc; switch (option) { case 'H': #if !HAS_URI_SUPPORT @@ -513,8 +513,8 @@ } else { ldapServer = xstrdup(value); } - argc--; - argv++; + --argc; + ++argv; } if (!ldapServer) ldapServer = xstrdup("localhost"); @@ -630,8 +630,8 @@ break; default: *escaped++ = *src++; - n++; - size--; + ++n; + --size; } } *escaped = '\0'; === modified file 'helpers/basic_auth/MSNT/confload.cc' --- helpers/basic_auth/MSNT/confload.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/MSNT/confload.cc 2012-07-02 08:15:37 +0000 @@ -199,7 +199,7 @@ strncpy(ServerArray[Serversqueried].pdc, ParamPDC, NTHOSTLEN - 1); strncpy(ServerArray[Serversqueried].bdc, ParamBDC, NTHOSTLEN - 1); strncpy(ServerArray[Serversqueried].domain, ParamDomain, NTHOSTLEN - 1); - Serversqueried++; + ++Serversqueried; } /* @@ -212,7 +212,7 @@ QueryServers(char *username, char *password) { int i; - for (i = 0; i < Serversqueried; i++) { + for (i = 0; i < Serversqueried; ++i) { if (0 == QueryServerForUser(i, username, password)) return 0; } === modified file 'helpers/basic_auth/MSNT/usersfile.cc' --- helpers/basic_auth/MSNT/usersfile.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/MSNT/usersfile.cc 2012-07-02 08:15:46 +0000 @@ -38,7 +38,7 @@ free_names(usersfile * uf) { int i; - for (i = 0; i < uf->Inuse; i++) { + for (i = 0; i < uf->Inuse; ++i) { if (uf->names[i]) free(uf->names[i]); uf->names[i] = NULL; @@ -115,7 +115,7 @@ (uf->Alloc >> 1) * sizeof(*uf->names)); } uf->names[uf->Inuse] = xstrdup(buf); - uf->Inuse++; + ++uf->Inuse; } fclose(fp); fp = NULL; === modified file 'helpers/basic_auth/NCSA/crypt_md5.cc' --- helpers/basic_auth/NCSA/crypt_md5.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/NCSA/crypt_md5.cc 2012-07-02 08:16:06 +0000 @@ -61,9 +61,9 @@ if (*salt == '$') { magic = salt++; while (*salt && *salt != '$') - salt++; + ++salt; if (*salt == '$') { - salt++; + ++salt; magiclen = salt - magic; } else { salt = magic; @@ -75,7 +75,7 @@ sp = salt; /* It stops at the first '$', max 8 chars */ - for (ep = sp; *ep && *ep != '$' && ep < (sp + 8); ep++) + for (ep = sp; *ep && *ep != '$' && ep < (sp + 8); ++ep) continue; /* get the length of the true salt */ @@ -124,7 +124,7 @@ * On a 60 Mhz Pentium this takes 34 msec, so you would * need 30 seconds to build a 1000 entry dictionary... */ - for (i = 0; i < 1000; i++) { + for (i = 0; i < 1000; ++i) { SquidMD5Init(&ctx1); if (i & 1) SquidMD5Update(&ctx1, (unsigned const char *) pw, strlen(pw)); @@ -188,7 +188,7 @@ SquidMD5Update(&ctx,(const unsigned char *)s,strlen(s)); SquidMD5Final(digest,&ctx); - for (idx=0; idx<16; idx++) + for (idx=0; idx<16; ++idx) snprintf(&sum[idx*2],(33-(idx*2)),"%02x",digest[idx]); sum[32]='\0'; === modified file 'helpers/basic_auth/RADIUS/basic_radius_auth.cc' --- helpers/basic_auth/RADIUS/basic_radius_auth.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/RADIUS/basic_radius_auth.cc 2012-07-02 08:21:40 +0000 @@ -264,16 +264,16 @@ tmp[2] = '\0'; while (*src && size > 1) { if (*src == '%' && src[1] != '\0' && src[2] != '\0') { - src++; + ++src; tmp[0] = *src++; tmp[1] = *src++; *dst++ = strtol(tmp, NULL, 16); } else { *dst++ = *src++; } - size--; + --size; } - *dst++ = '\0'; + *dst = '\0'; } static int @@ -348,7 +348,7 @@ md5_calc(cbc, md5buf, secretlen + AUTH_VECTOR_LEN); /* Xor the password into the MD5 digest */ - for (i = 0; i < AUTH_VECTOR_LEN; i++) { + for (i = 0; i < AUTH_VECTOR_LEN; ++i) { *ptr++ = (cbc[i] ^= passbuf[j + i]); } } @@ -566,7 +566,7 @@ /* Parse out the username and password */ ptr = buf; while (isspace(*ptr)) - ptr++; + ++ptr; if ((end = strchr(ptr, ' ')) == NULL) { SEND_ERR("No password"); continue; @@ -575,7 +575,7 @@ urldecode(username, ptr, MAXPWNAM); ptr = end + 1; while (isspace(*ptr)) - ptr++; + ++ptr; urldecode(passwd, ptr, MAXPASS); if (authenticate(sockfd, username, passwd)) === modified file 'helpers/basic_auth/RADIUS/radius-util.cc' --- helpers/basic_auth/RADIUS/radius-util.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/RADIUS/radius-util.cc 2012-07-02 08:21:49 +0000 @@ -79,17 +79,17 @@ digit_count = 0; while (*addr != '\0' && *addr != ' ') { if (*addr == '.') { - dot_count++; + ++dot_count; digit_count = 0; } else if (!isdigit(*addr)) { dot_count = 5; } else { - digit_count++; + ++digit_count; if (digit_count > 3) { dot_count = 5; } } - addr++; + ++addr; } if (dot_count != 3) { return(-1); @@ -112,7 +112,7 @@ int cur_byte; ipaddr = (uint32_t)0; - for (i = 0; i < 4; i++) { + for (i = 0; i < 4; ++i) { ptr = buf; count = 0; *ptr = '\0'; @@ -121,7 +121,7 @@ return((uint32_t)0); } *ptr++ = *ip_str++; - count++; + ++count; } if (count >= 4 || count == 0) { return((uint32_t)0); @@ -131,7 +131,7 @@ if (cur_byte < 0 || cur_byte > 255) { return((uint32_t)0); } - ip_str++; + ++ip_str; ipaddr = ipaddr << 8 | (uint32_t)cur_byte; } return(ipaddr); === modified file 'helpers/basic_auth/SMB/basic_smb_auth.cc' --- helpers/basic_auth/SMB/basic_smb_auth.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/SMB/basic_smb_auth.cc 2012-07-02 08:22:16 +0000 @@ -82,7 +82,7 @@ char *t; int i = 0; - for (t = s; *t != '\0'; t++) { + for (t = s; *t != '\0'; ++t) { if (i > HELPER_INPUT_BUFFER-2) { buf[i] = '\0'; (void) fputs(buf, p); @@ -118,7 +118,7 @@ return 1; /* parse command line arguments */ - for (i = 1; i < argc; i++) { + for (i = 1; i < argc; ++i) { if (strcmp(argv[i], "-d") == 0) { debug_enabled = 1; continue; @@ -178,13 +178,13 @@ return 1; /* convert backslashes to forward slashes */ - for (s = lastdom->authshare; *s != '\0'; s++) + for (s = lastdom->authshare; *s != '\0'; ++s) if (*s == '\\') *s = '/'; /* strip leading forward slash from share name */ if (*lastdom->authshare == '/') - lastdom->authshare++; + ++lastdom->authshare; if ((s = strchr(lastdom->authshare, '/')) != NULL) { *s = '\0'; === modified file 'helpers/basic_auth/SSPI/valid.cc' --- helpers/basic_auth/SSPI/valid.cc 2012-01-20 18:55:04 +0000 +++ helpers/basic_auth/SSPI/valid.cc 2012-07-02 08:22:25 +0000 @@ -93,7 +93,7 @@ */ if (nStatus == NERR_Success) { if ((pTmpBuf = pBuf) != NULL) { - for (i = 0; i < dwEntriesRead; i++) { + for (i = 0; i < dwEntriesRead; ++i) { if (pTmpBuf == NULL) { result = FALSE; break; @@ -102,8 +102,8 @@ result = TRUE; break; } - pTmpBuf++; - dwTotalCount++; + ++pTmpBuf; + ++dwTotalCount; } } } else @@ -136,7 +136,7 @@ errormsg = NTV_SERVER_ERROR_MSG; strncpy(NTDomain, UserName, sizeof(NTDomain)); - for (i=0; i < strlen(NTV_VALID_DOMAIN_SEPARATOR); i++) { + for (i=0; i < strlen(NTV_VALID_DOMAIN_SEPARATOR); ++i) { if ((domain_qualify = strchr(NTDomain, NTV_VALID_DOMAIN_SEPARATOR[i])) != NULL) break; } === modified file 'helpers/digest_auth/LDAP/ldap_backend.cc' --- helpers/digest_auth/LDAP/ldap_backend.cc 2012-01-20 18:55:04 +0000 +++ helpers/digest_auth/LDAP/ldap_backend.cc 2012-06-28 07:57:55 +0000 @@ -177,8 +177,8 @@ break; default: *escaped++ = *src++; - n++; - size--; + ++n; + --size; } } *escaped = '\0'; @@ -226,7 +226,7 @@ ldap_msgfree(res); /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */ if (!retry) { - retry++; + ++retry; ldap_unbind(ld); ld = NULL; ldapconnect(); @@ -267,7 +267,7 @@ password = *value; break; } - value++; + ++value; } debug("password: %s\n", password); if (password) @@ -279,7 +279,7 @@ fprintf(stderr, PROGRAM_NAME " WARNING, LDAP error '%s'\n", ldap_err2string(rc)); /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */ if (!retry) { - retry++; + ++retry; ldap_unbind(ld); ld = NULL; ldapconnect(); @@ -330,7 +330,7 @@ sslpath); exit(1); } else { - sslinit++; + ++sslinit; } if ((ld = ldapssl_init(ldapServer, port, 1)) == NULL) { fprintf(stderr, "\nUnable to connect to SSL LDAP server: %s port:%d\n", @@ -408,14 +408,14 @@ value = argv[1] + 2; } else if (argc > 2) { value = argv[2]; - argv++; - argc--; + ++argv; + --argc; } else value = ""; break; } - argv++; - argc--; + ++argv; + --argc; switch (option) { case 'H': #if !HAS_URI_SUPPORT @@ -559,8 +559,8 @@ } else { ldapServer = xstrdup(value); } - argc--; - argv++; + --argc; + ++argv; } if (!ldapServer) === modified file 'helpers/digest_auth/eDirectory/edir_ldapext.cc' --- helpers/digest_auth/eDirectory/edir_ldapext.cc 2012-01-20 18:55:04 +0000 +++ helpers/digest_auth/eDirectory/edir_ldapext.cc 2012-07-02 08:22:32 +0000 @@ -181,7 +181,7 @@ err = (ber_printf(requestBer, "{i{", methodIDLen) < 0) ? LDAP_ENCODING_ERROR : 0; } - for (i = 0; !err && i < elemCnt; i++) { + for (i = 0; !err && i < elemCnt; ++i) { err = (ber_printf(requestBer, "i", methodID[i]) < 0) ? LDAP_ENCODING_ERROR : 0; } === modified file 'helpers/digest_auth/eDirectory/ldap_backend.cc' --- helpers/digest_auth/eDirectory/ldap_backend.cc 2012-01-20 18:55:04 +0000 +++ helpers/digest_auth/eDirectory/ldap_backend.cc 2012-06-28 07:51:20 +0000 @@ -178,8 +178,8 @@ break; default: *escaped++ = *src++; - n++; - size--; + ++n; + --size; } } *escaped = '\0'; @@ -230,7 +230,7 @@ ldap_msgfree(res); /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */ if (!retry) { - retry++; + ++retry; ldap_unbind(ld); ld = NULL; ldapconnect(); @@ -290,7 +290,7 @@ password = *value; break; } - value++; + ++value; } debug("password: %s\n", password); if (password) @@ -307,7 +307,7 @@ fprintf(stderr, PROGRAM_NAME " WARNING, LDAP error '%s'\n", ldap_err2string(rc)); /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */ if (!retry) { - retry++; + ++retry; ldap_unbind(ld); ld = NULL; ldapconnect(); @@ -358,7 +358,7 @@ sslpath); exit(1); } else { - sslinit++; + ++sslinit; } if ((ld = ldapssl_init(ldapServer, port, 1)) == NULL) { fprintf(stderr, "\nUnable to connect to SSL LDAP server: %s port:%d\n", @@ -436,14 +436,14 @@ value = argv[1] + 2; } else if (argc > 2) { value = argv[2]; - argv++; - argc--; + ++argv; + --argc; } else value = ""; break; } - argv++; - argc--; + ++argv; + --argc; switch (option) { case 'H': #if !HAS_URI_SUPPORT @@ -590,8 +590,8 @@ } else { ldapServer = xstrdup(value); } - argc--; - argv++; + --argc; + ++argv; } if (!ldapServer) === modified file 'helpers/external_acl/AD_group/ext_ad_group_acl.cc' --- helpers/external_acl/AD_group/ext_ad_group_acl.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/AD_group/ext_ad_group_acl.cc 2012-06-28 08:00:42 +0000 @@ -358,19 +358,19 @@ if (User_Groups_Count == 0) { User_Groups = (wchar_t **) xmalloc(sizeof(wchar_t *)); *User_Groups = NULL; - User_Groups_Count++; + ++User_Groups_Count; } array = User_Groups; while (*array) { if (wcscmp(Group, *array) == 0) return 0; - array++; + ++array; } User_Groups = (wchar_t **) xrealloc(User_Groups, sizeof(wchar_t *) * (User_Groups_Count + 1)); User_Groups[User_Groups_Count] = NULL; User_Groups[User_Groups_Count - 1] = (wchar_t *) xmalloc((wcslen(Group) + 1) * sizeof(wchar_t)); wcscpy(User_Groups[User_Groups_Count - 1], Group); - User_Groups_Count++; + ++User_Groups_Count; return 1; } @@ -384,7 +384,7 @@ debug("Windows group: %S, Squid group: %S\n", str, *array); if (wcscmp(str, *array) == 0) return 0; - array++; + ++array; } return -1; } @@ -402,7 +402,7 @@ debug("Windows group: %S, Squid group: %S\n", str, wszGroup); if ((use_case_insensitive_compare ? _wcsicmp(str, wszGroup) : wcscmp(str, wszGroup)) == 0) return 0; - array++; + ++array; } return -1; } @@ -519,12 +519,12 @@ MultiByteToWideChar(CP_ACP, 0, Group, -1, wc, wcsize); *entry = My_NameTranslate(wc, source_group_format, ADS_NAME_TYPE_1779); safe_free(wc); - array++; + ++array; if (*entry == NULL) { debug("build_groups_DN_array: cannot get DN for '%s'.\n", Group); continue; } - entry++; + ++entry; } *entry = NULL; return wc_array; @@ -593,8 +593,8 @@ result = 1; break; } - pTmpBuf++; - dwTotalCount++; + ++pTmpBuf; + ++dwTotalCount; } } } else { @@ -705,7 +705,7 @@ result = 1; break; } - tmp++; + ++tmp; } } else debug("Valid_Global_Groups: ADsGetObject for %S failed, ERROR: %s\n", User_LDAP_path, Get_WIN32_ErrorMessage(hr)); @@ -716,14 +716,14 @@ tmp = wszGroups; while (*tmp) { safe_free(*tmp); - tmp++; + ++tmp; } safe_free(wszGroups); tmp = User_Groups; while (*tmp) { safe_free(*tmp); - tmp++; + ++tmp; } safe_free(User_Groups); User_Groups_Count = 0; === modified file 'helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc' --- helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/LDAP_group/ext_ldap_group_acl.cc 2012-06-28 13:13:35 +0000 @@ -251,14 +251,14 @@ value = argv[1] + 2; } else if (argc > 2) { value = argv[2]; - argv++; - argc--; + ++argv; + --argc; } else value = ""; break; } - argv++; - argc--; + ++argv; + --argc; switch (option) { case 'H': #if !HAS_URI_SUPPORT @@ -405,8 +405,8 @@ } else { ldapServer = xstrdup(value); } - argc--; - argv++; + --argc; + ++argv; } if (!ldapServer) @@ -528,7 +528,7 @@ fprintf(stderr, "FATAL: Unable to initialise SSL with cert path %s\n", sslpath); exit(1); } else { - sslinit++; + ++sslinit; } if ((ld = ldapssl_init(ldapServer, port, 1)) == NULL) { fprintf(stderr, "FATAL: Unable to connect to SSL LDAP server: %s port:%d\n", @@ -638,8 +638,8 @@ break; default: *escaped++ = *src++; - n++; - size--; + ++n; + --size; } } *escaped = '\0'; @@ -653,18 +653,18 @@ while (*templ && size > 0) { switch (*templ) { case '%': - templ++; + ++templ; switch (*templ) { case 'u': case 'v': - templ++; + ++templ; n = ldap_escape_value(filter, size, user); size -= n; filter += n; break; case 'g': case 'a': - templ++; + ++templ; n = ldap_escape_value(filter, size, group); size -= n; filter += n; @@ -676,15 +676,15 @@ } break; case '\\': - templ++; + ++templ; if (*templ) { *filter++ = *templ++; - size--; + --size; } break; default: *filter++ = *templ++; - size--; + --size; break; } } === modified file 'helpers/external_acl/LM_group/ext_lm_group_acl.cc' --- helpers/external_acl/LM_group/ext_lm_group_acl.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/LM_group/ext_lm_group_acl.cc 2012-06-28 13:22:07 +0000 @@ -229,7 +229,7 @@ debug("Windows group: %S, Squid group: %S\n", str, wszGroup); if ((use_case_insensitive_compare ? _wcsicmp(str, wszGroup) : wcscmp(str, wszGroup)) == 0) return 0; - array++; + ++array; } return -1; } @@ -295,8 +295,8 @@ result = 1; break; } - pTmpBuf++; - dwTotalCount++; + ++pTmpBuf; + ++dwTotalCount; } } } else @@ -432,8 +432,8 @@ result = 1; break; } - pTmpBuf++; - dwTotalCount++; + ++pTmpBuf; + ++dwTotalCount; } } } else { === modified file 'helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc' --- helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc 2012-05-28 02:40:52 +0000 +++ helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc 2012-06-28 10:01:59 +0000 @@ -237,7 +237,7 @@ va_end(ap); if (x > 0) { dbuf[x] = '\0'; - x++; + ++x; fputs(dbuf, stdout); *(dbuf) = '\0'; } else { @@ -267,7 +267,7 @@ // find the char delimiter position... char *p = In_Str; while (*p != chr && *p != '\0' && (In_Str+In_Len) > p) { - p++; + ++p; } size_t i = (p-In_Str); @@ -283,8 +283,8 @@ // omit the delimiter if (*p == chr) { - p++; - i++; + ++p; + ++i; } else { // chr not found (or \0 found first). Wipe whole input buffer. memset(In_Str, 0, In_Len); @@ -320,7 +320,7 @@ // find the char delimiter position... char *p = static_cast(In_Obj); while (*p != chr && (in+In_Sz) > p) { - p++; + ++p; } size_t i = (p-in); @@ -336,8 +336,8 @@ // omit the delimiter if (*p == chr) { - p++; - i++; + ++p; + ++i; } else { // chr not found memset(In_Obj, 0, In_Sz); @@ -853,13 +853,13 @@ /* bufa starts with a ::, so just copy and clear */ xstrncpy(bufb, bufa, sizeof(bufb)); *(bufa) = '\0'; - swi++; /* Indicates that there is a bufb */ + ++swi; /* Indicates that there is a bufb */ } else if ((bufa[0] == ':') && (bufa[1] != ':')) { /* bufa starts with a :, a typo so just fill in a ':', cat and clear */ bufb[0] = ':'; strncat(bufb, bufa, strlen(bufa)); *(bufa) = '\0'; - swi++; /* Indicates that there is a bufb */ + ++swi; /* Indicates that there is a bufb */ } else { p = strstr(bufa, "::"); if (p != NULL) { @@ -869,7 +869,7 @@ memcpy(bufb, p, i); *p = '\0'; bufb[i] = '\0'; - swi++; /* Indicates that there is a bufb */ + ++swi; /* Indicates that there is a bufb */ } } } @@ -973,21 +973,21 @@ t = strlen(bufb); /* How many ':' exist in bufb ? */ j = 0; - for (i = 0; i < t; i++) { + for (i = 0; i < t; ++i) { if (bufb[i] == ':') - j++; + ++j; } - j--; /* Preceeding "::" doesn't count */ + --j; /* Preceeding "::" doesn't count */ t = 8 - (strlen(l->search_ip) / 4) - j; /* Remainder */ if (t > 0) { - for (i = 0; i < t; i++) + for (i = 0; i < t; ++i) strncat(l->search_ip, "0000", 4); } } } if ((bufa[0] == '\0') && (swi > 0)) { s = strlen(bufb); - swi++; + ++swi; } else s = strlen(bufa); } @@ -1095,14 +1095,14 @@ for (i = 0; i < s; i++) { if (swi == 2) { bufc[j] = '\134'; - j++; + ++j; bufc[j] = l->search_ip[i]; - j++; + ++j; swi = 1; } else { bufc[j] = l->search_ip[i]; - j++; - swi++; + ++j; + ++swi; } } if (group == NULL) { @@ -1570,7 +1570,7 @@ edui_conf.mode |= EDUI_MODE_PERSIST; /* Don't set mode more than once */ break; case 'v': - i++; /* Set LDAP version */ + ++i; /* Set LDAP version */ if (argv[i] != NULL) { edui_conf.ver = atoi(argv[i]); if (edui_conf.ver < 1) @@ -1584,7 +1584,7 @@ } break; case 't': - i++; /* Set Persistent timeout */ + ++i; /* Set Persistent timeout */ if (argv[i] != NULL) { edui_conf.persist_timeout = atoi(argv[i]); if (edui_conf.persist_timeout < 0) @@ -1596,7 +1596,7 @@ } break; case 'b': - i++; /* Set Base DN */ + ++i; /* Set Base DN */ if (argv[i] != NULL) xstrncpy(edui_conf.basedn, argv[i], sizeof(edui_conf.basedn)); else { @@ -1606,7 +1606,7 @@ } break; case 'H': - i++; /* Set Hostname */ + ++i; /* Set Hostname */ if (argv[i] != NULL) xstrncpy(edui_conf.host, argv[i], sizeof(edui_conf.host)); else { @@ -1616,7 +1616,7 @@ } break; case 'p': - i++; /* Set port */ + ++i; /* Set port */ if (argv[i] != NULL) edui_conf.port = atoi(argv[i]); else { @@ -1626,7 +1626,7 @@ } break; case 'D': - i++; /* Set Bind DN */ + ++i; /* Set Bind DN */ if (argv[i] != NULL) xstrncpy(edui_conf.dn, argv[i], sizeof(edui_conf.dn)); else { @@ -1636,7 +1636,7 @@ } break; case 'W': - i++; /* Set Bind PWD */ + ++i; /* Set Bind PWD */ if (argv[i] != NULL) xstrncpy(edui_conf.passwd, argv[i], sizeof(edui_conf.passwd)); else { @@ -1646,7 +1646,7 @@ } break; case 'F': - i++; /* Set Search Filter */ + ++i; /* Set Search Filter */ if (argv[i] != NULL) xstrncpy(edui_conf.search_filter, argv[i], sizeof(edui_conf.search_filter)); else { @@ -1660,7 +1660,7 @@ edui_conf.mode |= EDUI_MODE_GROUP; /* Don't set mode more than once */ break; case 's': - i++; /* Set Scope Level */ + ++i; /* Set Scope Level */ if (argv[i] != NULL) { if (!strncmp(argv[i], "base", 4)) edui_conf.scope = 0; @@ -1677,7 +1677,7 @@ } break; case 'u': - i++; /* Set Search Attribute */ + ++i; /* Set Search Attribute */ if (argv[i] != NULL) { xstrncpy(edui_conf.attrib, argv[i], sizeof(edui_conf.attrib)); } else { === modified file 'helpers/external_acl/file_userip/ext_file_userip_acl.cc' --- helpers/external_acl/file_userip/ext_file_userip_acl.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/file_userip/ext_file_userip_acl.cc 2012-06-28 08:44:30 +0000 @@ -182,7 +182,7 @@ match_group(char *dict_group, char *username) { struct group *g; /* a struct to hold group entries */ - dict_group++; /* the @ should be the first char + ++dict_group; /* the @ should be the first char so we rip it off by incrementing * the pointer by one */ === modified file 'helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc' --- helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc 2012-06-28 08:44:57 +0000 @@ -385,7 +385,7 @@ if (nuser || nuser8) { if (nuser) { *nuser = '\0'; - nuser++; + ++nuser; } else { *nuser8 = '\0'; nuser = nuser8 + 3; @@ -400,7 +400,7 @@ } else if (domain) { strup(domain); *domain = '\0'; - domain++; + ++domain; } if (!domain && margs.ddomain) { domain = xstrdup(margs.ddomain); @@ -435,7 +435,7 @@ { while (*s) { *s = toupper((unsigned char) *s); - s++; + ++s; } } === modified file 'helpers/external_acl/kerberos_ldap_group/support_group.cc' --- helpers/external_acl/kerberos_ldap_group/support_group.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_group.cc 2012-06-28 09:01:26 +0000 @@ -57,7 +57,7 @@ return NULL; for (n = 0; n < strlen(src); n++) if ((unsigned char) src[n] > 127) - c++; + ++c; if (c != 0) { p = (unsigned char *) xmalloc(strlen(src) + c); dupp = p; @@ -65,15 +65,15 @@ s = (unsigned char) src[n]; if (s > 127 && s < 192) { *p = 194; - p++; + ++p; *p = s; } else if (s > 191 && s < 256) { *p = 195; - p++; + ++p; *p = s - 64; } else *p = s; - p++; + ++p; } *p = '\0'; debug((char *) "%s| %s: INFO: Group %s as UTF-8: %s\n", LogTime(), PROGRAM, src, dupp); @@ -134,8 +134,8 @@ break; if (up[n] == '@') { ul[nl] = '@'; - nl++; - n++; + ++nl; + ++n; continue; } ival = up[n]; @@ -159,7 +159,7 @@ xfree(ul); return NULL; } - n++; + ++n; ival = up[n]; if (ival > 64 && ival < 71) ichar = ichar + ival - 55; @@ -184,7 +184,7 @@ } else if (iUTF2 > 0xC3 && iUTF2 < 0xE0 && ichar > 0x7F && ichar < 0xC0) { iUTF2 = 0; ul[nl] = ichar; - nl++; + ++nl; } else { iUTF2 = 0; ul[nl] = ichar; @@ -198,23 +198,23 @@ if (iUTF3 == 0xE0 && ichar > 0x9F && ichar < 0xC0) { iUTF3 = 1; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF3 > 0xE0 && iUTF3 < 0xED && ichar > 0x7F && ichar < 0xC0) { iUTF3 = 2; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF3 == 0xED && ichar > 0x7F && ichar < 0xA0) { iUTF3 = 3; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF3 > 0xED && iUTF3 < 0xF0 && ichar > 0x7F && ichar < 0xC0) { iUTF3 = 4; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF3 > 0 && iUTF3 < 5 && ichar > 0x7F && ichar < 0xC0) { iUTF3 = 0; ul[nl] = ichar; - nl++; + ++nl; } else { iUTF3 = 0; ul[nl] = ichar; @@ -228,22 +228,22 @@ if (iUTF4 == 0xF0 && ichar > 0x8F && ichar < 0xC0) { iUTF4 = 1; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF4 > 0xF0 && iUTF3 < 0xF4 && ichar > 0x7F && ichar < 0xC0) { iUTF4 = 2; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF4 == 0xF4 && ichar > 0x7F && ichar < 0x90) { iUTF4 = 3; ul[nl] = ichar; - nl++; + ++nl; } else if (iUTF4 > 0 && iUTF4 < 5 && ichar > 0x7F && ichar < 0xC0) { if (iUTF4 == 4) iUTF4 = 0; else iUTF4 = 4; ul[nl] = ichar; - nl++; + ++nl; } else { iUTF4 = 0; ul[nl] = ichar; @@ -256,22 +256,22 @@ } else if (ichar < 0x80) { /* UTF1 */ ul[nl] = ichar; - nl++; + ++nl; } else if (ichar > 0xC1 && ichar < 0xE0) { /* UTF2 (Latin) */ iUTF2 = ichar; ul[nl] = ichar; - nl++; + ++nl; } else if (ichar > 0xDF && ichar < 0xF0) { /* UTF3 */ iUTF3 = ichar; ul[nl] = ichar; - nl++; + ++nl; } else if (ichar > 0xEF && ichar < 0xF5) { /* UTF4 */ iUTF4 = ichar; ul[nl] = ichar; - nl++; + ++nl; } else { ul[nl] = ichar; ul[nl + 1] = '\0'; @@ -280,7 +280,7 @@ xfree(ul); return NULL; } - n++; + ++n; } ul[nl] = '\0'; @@ -373,7 +373,7 @@ } while (*p) { /* loop over group list */ if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ - p++; + ++p; continue; } if (*p == '@') { /* end of group name - start of domain name */ @@ -382,7 +382,7 @@ return (1); } *p = '\0'; - p++; + ++p; gdsp = init_gd(); gdsp->group = gp; if (gdspn) /* Have already an existing structure */ @@ -394,7 +394,7 @@ return (1); } *p = '\0'; - p++; + ++p; if (dp) { /* end of domain name */ gdsp->domain = xstrdup(dp); dp = NULL; @@ -408,7 +408,7 @@ gp = p; /* after : starts new group name */ debug((char *) "%s| %s: INFO: Group %s Domain %s\n", LogTime(), PROGRAM, gdsp->group, gdsp->domain ? gdsp->domain : "NULL"); } else - p++; + ++p; } if (p == gp) { /* empty group name not allowed */ debug((char *) "%s| %s: ERROR: No group defined for domain %s\n", LogTime(), PROGRAM, p); === modified file 'helpers/external_acl/kerberos_ldap_group/support_krb5.cc' --- helpers/external_acl/kerberos_ldap_group/support_krb5.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_krb5.cc 2012-06-28 10:01:57 +0000 @@ -92,7 +92,7 @@ krb5_kt_default_name(kparam.context, buf, KT_PATH_MAX); p = strchr(buf, ':'); /* Find the end if "FILE:" */ if (p) - p++; /* step past : */ + ++p; /* step past : */ keytab_name = xstrdup(p ? p : buf); debug((char *) "%s| %s: DEBUG: Got default keytab file name %s\n", LogTime(), PROGRAM, keytab_name); === modified file 'helpers/external_acl/kerberos_ldap_group/support_ldap.cc' --- helpers/external_acl/kerberos_ldap_group/support_ldap.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_ldap.cc 2012-06-28 10:01:54 +0000 @@ -229,7 +229,7 @@ for (dp = domain; *dp; dp++) { if (*dp == '.') - i++; + ++i; } /* * add dc= and @@ -282,7 +282,7 @@ ldf = ldf + 3; } else { *ldf = *filter; - ldf++; + ++ldf; } } *ldf = '\0'; @@ -933,7 +933,7 @@ port = 389; if ((p = strchr(host, ':'))) { *p = '\0'; - p++; + ++p; port = atoi(p); } nhosts = get_hostname_list(margs, &hlist, 0, host); === modified file 'helpers/external_acl/kerberos_ldap_group/support_lserver.cc' --- helpers/external_acl/kerberos_ldap_group/support_lserver.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_lserver.cc 2012-06-28 10:01:52 +0000 @@ -67,7 +67,7 @@ } while (*p) { /* loop over group list */ if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ - p++; + ++p; continue; } if (*p == '@') { /* end of group name - start of domain name */ @@ -76,7 +76,7 @@ return (1); } *p = '\0'; - p++; + ++p; lssp = init_ls(); lssp->lserver = xstrdup(np); if (lsspn) /* Have already an existing structure */ @@ -88,7 +88,7 @@ return (1); } *p = '\0'; - p++; + ++p; if (dp) { /* end of domain name */ lssp->domain = xstrdup(dp); dp = NULL; @@ -102,7 +102,7 @@ np = p; /* after : starts new group name */ debug((char *) "%s| %s: DEBUG: ldap server %s Domain %s\n", LogTime(), PROGRAM, lssp->lserver, lssp->domain?lssp->domain:"NULL"); } else - p++; + ++p; } if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No ldap servers defined for domain %s\n", LogTime(), PROGRAM, p); === modified file 'helpers/external_acl/kerberos_ldap_group/support_member.cc' --- helpers/external_acl/kerberos_ldap_group/support_member.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_member.cc 2012-06-28 10:02:18 +0000 @@ -62,7 +62,7 @@ debug((char *) "%s| %s: INFO: User %s is member of group@domain %s@%s\n", LogTime(), PROGRAM, user, gr->group, gr->domain); else log((char *) "%s| %s: INFO: User %s is member of group@domain %s@%s\n", LogTime(), PROGRAM, user, gr->group, gr->domain); - found++; + ++found; break; } else { if (debug_enabled) @@ -90,7 +90,7 @@ debug((char *) "%s| %s: INFO: User %s is member of group@domain %s@%s\n", LogTime(), PROGRAM, user, gr->group, gr->domain); else log((char *) "%s| %s: INFO: User %s is member of group@domain %s@%s\n", LogTime(), PROGRAM, user, gr->group, gr->domain); - found++; + ++found; break; } else { if (debug_enabled) @@ -118,7 +118,7 @@ debug((char *) "%s| %s: INFO: User %s is member of group@domain %s@%s\n", LogTime(), PROGRAM, user, gr->group, gr->domain ? gr->domain : "NULL"); else log((char *) "%s| %s: INFO: User %s is member of group@domain %s@%s\n", LogTime(), PROGRAM, user, gr->group, gr->domain ? gr->domain : "NULL"); - found++; + ++found; break; } else { if (debug_enabled) === modified file 'helpers/external_acl/kerberos_ldap_group/support_netbios.cc' --- helpers/external_acl/kerberos_ldap_group/support_netbios.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_netbios.cc 2012-06-28 12:47:10 +0000 @@ -68,7 +68,7 @@ } while (*p) { /* loop over group list */ if (*p == '\n' || *p == '\r') { /* Ignore CR and LF if exist */ - p++; + ++p; continue; } if (*p == '@') { /* end of group name - start of domain name */ @@ -77,7 +77,7 @@ return (1); } *p = '\0'; - p++; + ++p; ndsp = init_nd(); ndsp->netbios = xstrdup(np); if (ndspn) /* Have already an existing structure */ @@ -89,7 +89,7 @@ return (1); } *p = '\0'; - p++; + ++p; if (dp) { /* end of domain name */ ndsp->domain = xstrdup(dp); dp = NULL; @@ -107,7 +107,7 @@ } debug((char *) "%s| %s: DEBUG: Netbios name %s Domain %s\n", LogTime(), PROGRAM, ndsp->netbios, ndsp->domain); } else - p++; + ++p; } if (p == np) { /* empty group name not allowed */ debug((char *) "%s| %s: DEBUG: No netbios name defined for domain %s\n", LogTime(), PROGRAM, p); === modified file 'helpers/external_acl/kerberos_ldap_group/support_resolv.cc' --- helpers/external_acl/kerberos_ldap_group/support_resolv.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_resolv.cc 2012-06-28 12:48:13 +0000 @@ -189,7 +189,7 @@ hres_list = hres; count = 0; while (hres_list) { - count++; + ++count; hres_list = hres_list->ai_next; } hres_list = hres; @@ -202,7 +202,7 @@ *hlist = hp; return (nhosts); } - count++; + ++count; debug((char *) "%s| %s: DEBUG: Resolved address %d of %s to %s\n", LogTime(), PROGRAM, count, name, host); hp = (struct hstruct *) xrealloc(hp, sizeof(struct hstruct) * (nhosts + 1)); @@ -210,7 +210,7 @@ hp[nhosts].port = -1; hp[nhosts].priority = -1; hp[nhosts].weight = -1; - nhosts++; + ++nhosts; hres_list = hres_list->ai_next; } @@ -251,7 +251,7 @@ hp[nhosts].port = -1; hp[nhosts].priority = -2; hp[nhosts].weight = -2; - nhosts++; + ++nhosts; } else if ( !ls->domain || !strcasecmp(ls->domain, "") ) { debug((char *) "%s| %s: DEBUG: Found lserver@domain %s@%s\n", LogTime(), PROGRAM, ls->lserver, ls->domain?ls->domain:"NULL"); hp = (struct hstruct *) xrealloc(hp, sizeof(struct hstruct) * (nhosts + 1)); @@ -259,7 +259,7 @@ hp[nhosts].port = -1; hp[nhosts].priority = -2; hp[nhosts].weight = -2; - nhosts++; + ++nhosts; } ls = ls->next; @@ -381,7 +381,7 @@ hp[nh].port = port; hp[nh].priority = priority; hp[nh].weight = weight; - nh++; + ++nh; p += size; } else { p += rdlength; @@ -410,24 +410,24 @@ hp[nhosts].port = -1; hp[nhosts].priority = -2; hp[nhosts].weight = -2; - nhosts++; + ++nhosts; /* Remove duplicates */ - for (i = 0; i < nhosts; i++) { - for (j = i + 1; j < nhosts; j++) { + for (i = 0; i < nhosts; ++i) { + for (j = i + 1; j < nhosts; ++j) { if (!strcasecmp(hp[i].host, hp[j].host)) { if (hp[i].port == hp[j].port || (hp[i].port == -1 && hp[j].port == 389) || (hp[i].port == 389 && hp[j].port == -1)) { xfree(hp[j].host); - for (k = j + 1; k < nhosts; k++) { + for (k = j + 1; k < nhosts; ++k) { hp[k - 1].host = hp[k].host; hp[k - 1].port = hp[k].port; hp[k - 1].priority = hp[k].priority; hp[k - 1].weight = hp[k].weight; } - j--; - nhosts--; + --j; + --nhosts; hp = (struct hstruct *) xrealloc(hp, sizeof(struct hstruct) * (nhosts + 1)); } } @@ -439,7 +439,7 @@ if (debug_enabled) { debug((char *) "%s| %s: DEBUG: Sorted ldap server names for domain %s:\n", LogTime(), PROGRAM, domain); - for (i = 0; i < nhosts; i++) { + for (i = 0; i < nhosts; ++i) { debug((char *) "%s| %s: DEBUG: Host: %s Port: %d Priority: %d Weight: %d\n", LogTime(), PROGRAM, hp[i].host, hp[i].port, hp[i].priority, hp[i].weight); } } === modified file 'helpers/external_acl/kerberos_ldap_group/support_sasl.cc' --- helpers/external_acl/kerberos_ldap_group/support_sasl.cc 2012-01-20 18:55:04 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_sasl.cc 2012-06-28 12:48:30 +0000 @@ -187,7 +187,7 @@ if (rc) return rc; - interact++; + ++interact; } return LDAP_SUCCESS; === modified file 'helpers/log_daemon/file/log_file_daemon.cc' --- helpers/log_daemon/file/log_file_daemon.cc 2012-01-20 18:55:04 +0000 +++ helpers/log_daemon/file/log_file_daemon.cc 2012-06-28 06:57:58 +0000 @@ -53,7 +53,7 @@ #endif /* Rotate numbers 0 through N up one */ for (i = rotate_count; i > 1;) { - i--; + --i; snprintf(from, MAXPATHLEN, "%s.%d", path, i - 1); snprintf(to, MAXPATHLEN, "%s.%d", path, i); #if _SQUID_OS2_ || _SQUID_WINDOWS_ === modified file 'helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc' --- helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc 2012-01-20 18:55:04 +0000 +++ helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc 2012-06-28 13:23:09 +0000 @@ -135,7 +135,7 @@ hres_list = hres; count = 0; while (hres_list) { - count++; + ++count; hres_list = hres_list->ai_next; } rc = getnameinfo(hres->ai_addr, hres->ai_addrlen, hostname, === modified file 'helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc' --- helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc 2012-01-20 18:55:04 +0000 +++ helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc 2012-06-28 06:57:58 +0000 @@ -227,7 +227,7 @@ while (count > 0) { Token = (const char *) squid_kerb_proxy_auth(argv[1]); fprintf(stdout, "YR %s\n", Token ? Token : "NULL"); - count--; + --count; } fprintf(stdout, "QQ\n"); } else { === modified file 'helpers/negotiate_auth/wrapper/negotiate_wrapper.cc' --- helpers/negotiate_auth/wrapper/negotiate_wrapper.cc 2012-01-20 18:55:04 +0000 +++ helpers/negotiate_auth/wrapper/negotiate_wrapper.cc 2012-07-02 08:23:12 +0000 @@ -137,7 +137,7 @@ j = 2; } - for (i=j; i= 3 && (!strncmp(tbuff,"AF ",3) || !strncmp(tbuff,"NA ",3))) { strncpy(buff,tbuff,3); buff[3]='='; - for (unsigned int i=2; i<=strlen(tbuff); i++) + for (unsigned int i=2; i<=strlen(tbuff); ++i) buff[i+2] = tbuff[i]; } else { strcpy(buff,tbuff); === modified file 'helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc' --- helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc 2012-01-20 18:55:04 +0000 +++ helpers/ntlm_auth/SSPI/ntlm_sspi_auth.cc 2012-07-02 08:25:00 +0000 @@ -140,7 +140,7 @@ */ if (nStatus == NERR_Success) { if ((pTmpBuf = pBuf) != NULL) { - for (i = 0; i < dwEntriesRead; i++) { + for (i = 0; i < dwEntriesRead; ++i) { if (pTmpBuf == NULL) { result = FALSE; break; @@ -149,8 +149,8 @@ result = TRUE; break; } - pTmpBuf++; - dwTotalCount++; + ++pTmpBuf; + ++dwTotalCount; } } } else === modified file 'helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc' --- helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc 2012-01-20 18:55:04 +0000 +++ helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc 2012-07-02 08:24:54 +0000 @@ -411,7 +411,7 @@ exit(1); /* Okay, now begin filling controllers up */ /* we can avoid memcpy-ing, and just reuse argv[] */ - for (j = optind; j < argc; j++) { + for (j = optind; j < argc; ++j) { char *d, *c; /* d will not be freed in case of non-error. Since we don't reconfigure, * it's going to live as long as the process anyways */ @@ -439,7 +439,7 @@ /* capitalize */ uc(c); uc(d); - numcontrollers++; + ++numcontrollers; new_dc->domain = d; new_dc->controller = c; new_dc->dead = 0; @@ -468,7 +468,7 @@ { int j = 0; const char *ch = NULL; - for (j = 0; j < numcontrollers; j++) { + for (j = 0; j < numcontrollers; ++j) { debug("obtain_challenge: selecting %s\\%s (attempt #%d)\n", current_dc->domain, current_dc->controller, j + 1); if (current_dc->dead != 0) { @@ -698,7 +698,7 @@ debug("load balancing. Selected controller #%d\n", n); while (n > 0) { current_dc = current_dc->next; - n--; + --n; } } while (1) { === modified file 'lib/MemPool.cc' --- lib/MemPool.cc 2012-01-20 18:55:04 +0000 +++ lib/MemPool.cc 2012-06-28 13:31:21 +0000 @@ -302,7 +302,7 @@ iter = memPoolIterate(); while ((pool = memPoolIterateNext(iter))) { if (pool->getStats(&pp_stats, 1) > 0) - pools_inuse++; + ++pools_inuse; } memPoolIterateDone(&iter); === modified file 'lib/MemPoolChunked.cc' --- lib/MemPoolChunked.cc 2012-01-20 18:55:04 +0000 +++ lib/MemPoolChunked.cc 2012-07-02 09:24:24 +0000 @@ -147,7 +147,7 @@ freeList = objCache; void **Free = (void **)freeList; - for (int i = 1; i < pool->chunk_capacity; i++) { + for (int i = 1; i < pool->chunk_capacity; ++i) { *Free = (void *) ((char *) Free + pool->obj_size); void **nextFree = (void **)*Free; (void) VALGRIND_MAKE_MEM_NOACCESS(Free, pool->obj_size); @@ -158,7 +158,7 @@ memMeterAdd(pool->getMeter().alloc, pool->chunk_capacity); memMeterAdd(pool->getMeter().idle, pool->chunk_capacity); - pool->chunkCount++; + ++pool->chunkCount; lastref = squid_curtime; pool->allChunks.insert(this, memCompChunks); } @@ -217,7 +217,7 @@ { void **Free; - saved_calls++; + ++saved_calls; /* first, try cache */ if (freeCache) { @@ -239,7 +239,7 @@ Free = (void **)chunk->freeList; chunk->freeList = *Free; *Free = NULL; - chunk->inuse_count++; + ++chunk->inuse_count; chunk->lastref = squid_curtime; if (chunk->freeList == NULL) { @@ -480,9 +480,9 @@ chunk = Chunks; while (chunk) { if (chunk->inuse_count == 0) - chunks_free++; + ++chunks_free; else if (chunk->inuse_count < chunk_capacity) - chunks_partial++; + ++chunks_partial; chunk = chunk->next; } === modified file 'lib/MemPoolMalloc.cc' --- lib/MemPoolMalloc.cc 2012-01-20 18:55:04 +0000 +++ lib/MemPoolMalloc.cc 2012-07-02 07:19:07 +0000 @@ -57,7 +57,7 @@ void *obj = freelist.pop(); if (obj) { memMeterDec(meter.idle); - saved_calls++; + ++saved_calls; } else { obj = xcalloc(1, obj_size); memMeterInc(meter.alloc); === modified file 'lib/hash.cc' --- lib/hash.cc 2012-06-03 08:10:29 +0000 +++ lib/hash.cc 2012-06-28 14:20:57 +0000 @@ -71,7 +71,7 @@ unsigned int j = 0; unsigned int i = 0; while (*s) { - j++; + ++j; n ^= 271 * (*s++); } i = n ^ (j * 271); @@ -169,7 +169,7 @@ i = hid->hash(lnk->key, hid->size); lnk->next = hid->buckets[i]; hid->buckets[i] = lnk; - hid->count++; + ++hid->count; } /** @@ -268,7 +268,7 @@ if (NULL == hid->next) hash_next_bucket(hid); } - hid->count--; + --hid->count; return; } assert(0); @@ -295,9 +295,9 @@ hash_first(hid); while ((l = hash_next(hid)) && i < hid->count) { *(list + i) = l; - i++; + ++i; } - for (int j = 0; j < i; j++) + for (int j = 0; j < i; ++j) free_func(*(list + j)); xfree(list); } @@ -334,7 +334,7 @@ int best_prime = hash_primes[0]; double min = fabs(log((double) n) - log((double) hash_primes[0])); double d; - for (int i = 0; i < I; i++) { + for (int i = 0; i < I; ++i) { d = fabs(log((double) n) - log((double) hash_primes[i])); if (d > min) continue; === modified file 'lib/malloc_trace.cc' --- lib/malloc_trace.cc 2012-01-20 18:55:04 +0000 +++ lib/malloc_trace.cc 2012-07-02 09:24:19 +0000 @@ -124,8 +124,8 @@ /* calloc the ptrs so that we don't see them when hunting lost memory */ malloc_ptrs = calloc(DBG_ARRY_BKTS, sizeof(*malloc_ptrs)); - for (B = 0; B < DBG_ARRY_BKTS; B++) { - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (B = 0; B < DBG_ARRY_BKTS; ++B) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { malloc_ptrs[B][I] = NULL; malloc_size[B][I] = 0; #if XMALLOC_TRACE @@ -147,7 +147,7 @@ int B, I; B = DBG_HASH_BUCKET(s); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] != s) continue; @@ -189,7 +189,7 @@ B = DBG_HASH_BUCKET(p); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (!(P = malloc_ptrs[B][I])) continue; @@ -206,7 +206,7 @@ } } - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I]) continue; @@ -244,7 +244,7 @@ int B, I; B = DBG_HASH_BUCKET(p); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] == p) return malloc_size[B][I]; } @@ -261,7 +261,7 @@ int B, I; B = DBG_HASH_BUCKET(p); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] == p) return malloc_file[B][I]; } @@ -275,7 +275,7 @@ int B, I; B = DBG_HASH_BUCKET(p); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] == p) return malloc_line[B][I]; } @@ -289,7 +289,7 @@ int B, I; B = DBG_HASH_BUCKET(p); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] == p) return malloc_count[B][I]; } @@ -350,7 +350,7 @@ if (p && p != start) { B = DBG_HASH_BUCKET(p); - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] == p) { if (!malloc_refs[B][I]++) { /* A new reference */ @@ -399,8 +399,8 @@ fprintf(stderr, "----- Memory map ----\n"); xmalloc_scan_region(&_etext, (void *) sbrk(0) - (void *) &_etext, 0); - for (B = 0; B < DBG_ARRY_BKTS; B++) { - for (I = 0; I < DBG_ARRY_SZ; I++) { + for (B = 0; B < DBG_ARRY_BKTS; ++B) { + for (I = 0; I < DBG_ARRY_SZ; ++I) { if (malloc_ptrs[B][I] && malloc_refs[B][I] == 0) { /* Found a leak... */ fprintf(stderr, "Leak found: %p", malloc_ptrs[B][I]); === modified file 'lib/ntlmauth/ntlmauth.cc' --- lib/ntlmauth/ntlmauth.cc 2012-03-23 07:14:21 +0000 +++ lib/ntlmauth/ntlmauth.cc 2012-07-02 08:25:05 +0000 @@ -137,25 +137,25 @@ unsigned short *s = (unsigned short *)rv.str; rv.str = d = buf; - for (l >>= 1; l; s++, l--) { + for (l >>= 1; l; ++s, --l) { unsigned short c = le16toh(*s); if (c > 254 || c == '\0') { fprintf(stderr, "ntlmssp: bad unicode: %04x\n", c); return rv; } *d++ = c; - rv.l++; + ++rv.l; } } else { /* ASCII/OEM string */ char *sc = rv.str; - for (; l>=0; sc++, l--) { + for (; l>=0; ++sc, --l) { if (*sc == '\0' || !xisprint(*sc)) { fprintf(stderr, "ntlmssp: bad ascii: %04x\n", *sc); return rv; } - rv.l++; + ++rv.l; } } @@ -209,7 +209,7 @@ int r = (int) rand(); r = (hash ^ r) + r; - for (i = 0; i < NTLM_NONCE_LEN; i++) { + for (i = 0; i < NTLM_NONCE_LEN; ++i) { nonce[i] = r; r = (r >> 2) ^ r; } === modified file 'lib/profiler/Profiler.cc' --- lib/profiler/Profiler.cc 2012-01-20 18:55:04 +0000 +++ lib/profiler/Profiler.cc 2012-06-28 13:28:27 +0000 @@ -161,7 +161,7 @@ if (head->worst < head->delta) head->worst = head->delta; head->summ += head->delta; - head->count++; + ++head->count; } static xprof_stats_data *xp_UNACCOUNTED; @@ -209,7 +209,7 @@ cstack[cstack_head].accum = 0; cstack[cstack_head].timer = type; cstack[cstack_head].name = timer; - cstack_head++; + ++cstack_head; assert(cstack_head < MAXSTACKDEPTH); } @@ -219,7 +219,7 @@ { hrtime_t tt = get_tick(); assert(cstack_head > 0); - cstack_head--; + --cstack_head; assert(cstack[cstack_head].timer == type); /* Record timer details */ === modified file 'src/acl/Asn.cc' --- src/acl/Asn.cc 2012-01-20 18:55:04 +0000 +++ src/acl/Asn.cc 2012-07-02 09:25:47 +0000 @@ -201,12 +201,14 @@ void asnInit(void) { - static int inited = 0; + static bool inited = false; squid_max_keylen = 40; CBDATA_INIT_TYPE(ASState); - if (0 == inited++) + if (!inited) { + inited = true; squid_rn_init(); + } squid_rn_inithead(&AS_tree_head, 8); @@ -310,9 +312,9 @@ while ((size_t)(s - buf) < result.length + asState->reqofs && *s != '\0') { while (*s && xisspace(*s)) - s++; + ++s; - for (t = s; *t; t++) { + for (t = s; *t; ++t) { if (xisspace(*t)) break; } @@ -635,7 +637,7 @@ const ipcache_addrs *ia = ipcache_gethostbyname(checklist->request->GetHost(), IP_LOOKUP_IF_MISS); if (ia) { - for (int k = 0; k < (int) ia->count; k++) { + for (int k = 0; k < (int) ia->count; ++k) { if (data->match(ia->in_addrs[k])) return 1; } === modified file 'src/acl/DestinationIp.cc' --- src/acl/DestinationIp.cc 2012-01-20 18:55:04 +0000 +++ src/acl/DestinationIp.cc 2012-07-02 09:25:53 +0000 @@ -67,7 +67,7 @@ if (ia) { /* Entry in cache found */ - for (int k = 0; k < (int) ia->count; k++) { + for (int k = 0; k < (int) ia->count; ++k) { if (ACLIP::match(ia->in_addrs[k])) return 1; } === modified file 'src/acl/Gadgets.cc' --- src/acl/Gadgets.cc 2012-01-20 18:55:04 +0000 +++ src/acl/Gadgets.cc 2012-07-02 07:19:21 +0000 @@ -214,7 +214,7 @@ if (*t == '!') { L->negated (true); - t++; + ++t; } debugs(28, 3, "aclParseAclList: looking for ACL name '" << t << "'"); === modified file 'src/acl/Ip.cc' --- src/acl/Ip.cc 2012-01-20 18:55:04 +0000 +++ src/acl/Ip.cc 2012-07-02 07:19:41 +0000 @@ -99,7 +99,7 @@ if (!addr2.IsAnyAddr()) { b2[0] = '-'; - rlen++; + ++rlen; addr2.NtoA(&(b2[1]), len - rlen ); rlen = strlen(buf); } else @@ -109,7 +109,7 @@ if (!mask.IsNoAddr()) { b3[0] = '/'; - rlen++; + ++rlen; int cidr = mask.GetCIDR() - (addr1.IsIPv4()?96:0); snprintf(&(b3[1]), (len-rlen), "%u", (unsigned int)(cidr<0?0:cidr) ); } else === modified file 'src/acl/RegexData.cc' --- src/acl/RegexData.cc 2012-01-20 18:55:04 +0000 +++ src/acl/RegexData.cc 2012-07-02 09:25:58 +0000 @@ -238,11 +238,11 @@ if (largeREindex > 0) largeRE[largeREindex++] = '|'; largeRE[largeREindex++] = '('; - for (char * t = wl->key; *t != '\0'; t++) + for (char * t = wl->key; *t != '\0'; ++t) largeRE[largeREindex++] = *t; largeRE[largeREindex++] = ')'; largeRE[largeREindex] = '\0'; - numREs++; + ++numREs; } else { debugs(28, 2, "compileOptimisedREs: buffer full, generating new optimised RE..." ); newlistp = compileRE( newlistp, largeRE, flags ); === modified file 'src/adaptation/Config.cc' --- src/adaptation/Config.cc 2012-01-20 18:55:04 +0000 +++ src/adaptation/Config.cc 2012-07-02 09:27:29 +0000 @@ -226,7 +226,7 @@ ServicePointer s = createService(cfg); if (s != NULL) { AllServices().push_back(s); - created++; + ++created; } } @@ -285,7 +285,7 @@ ConfigParser::ParseQuotedString(&value); // TODO: Find a way to move this check to ICAP - for (int i = 0; warnFor[i] != NULL; i++) { + for (int i = 0; warnFor[i] != NULL; ++i) { if (name.caseCmp(warnFor[i]) == 0) { fatalf("%s:%d: meta name \"%s\" is a reserved ICAP header name", cfg_filename, config_lineno, name.termedBuf()); === modified file 'src/adaptation/ServiceConfig.cc' --- src/adaptation/ServiceConfig.cc 2012-01-20 18:55:04 +0000 +++ src/adaptation/ServiceConfig.cc 2012-07-02 07:24:08 +0000 @@ -187,7 +187,7 @@ if ((t = strchr(s, ']')) == NULL) return false; - s++; + ++s; len = t - s; if ((e = strchr(t, ':')) != NULL) { have_port = true; @@ -212,7 +212,7 @@ port = -1; if (have_port) { - s++; + ++s; if ((e = strchr(s, '/')) != NULL) { char *t; @@ -235,7 +235,7 @@ // if no port, the caller may use service_configConfigs or supply the default if neeeded - s++; + ++s; e = strchr(s, '\0'); len = e - s; === modified file 'src/adaptation/icap/ServiceRep.cc' --- src/adaptation/icap/ServiceRep.cc 2012-01-20 18:55:04 +0000 +++ src/adaptation/icap/ServiceRep.cc 2012-07-02 07:19:54 +0000 @@ -479,7 +479,7 @@ method_list.append(ICAP::methodStr(*iter)); method_list.append(" ", 1); - iter++; + ++iter; } if (!method_found) { === modified file 'src/auth/User.cc' --- src/auth/User.cc 2012-01-20 18:55:04 +0000 +++ src/auth/User.cc 2012-07-02 07:39:04 +0000 @@ -140,10 +140,10 @@ if (!found) { /* This ip is not in the seen list. Add it. */ dlinkAddTail(&new_ipdata->node, &ipdata->node, &ip_list); - ipcount++; + ++ipcount; /* remove from the source list */ dlinkDelete(&new_ipdata->node, &(from->ip_list)); - from->ipcount--; + ++from->ipcount; } } } @@ -334,7 +334,7 @@ dlinkAddTail(ipdata, &ipdata->node, &ip_list); - ipcount++; + ++ipcount; debugs(29, 2, HERE << "user '" << username() << "' has been seen at a new IP address (" << ipaddr << ")"); } === modified file 'src/auth/basic/auth_basic.cc' --- src/auth/basic/auth_basic.cc 2012-01-20 18:55:04 +0000 +++ src/auth/basic/auth_basic.cc 2012-07-02 07:24:06 +0000 @@ -223,11 +223,11 @@ /* trim BASIC from string */ while (xisgraph(*proxy_auth)) - proxy_auth++; + ++proxy_auth; /* Trim leading whitespace before decoding */ while (xisspace(*proxy_auth)) - proxy_auth++; + ++proxy_auth; /* Trim trailing \n before decoding */ // XXX: really? is the \n actually still there? does the header parse not drop it? === modified file 'src/auth/digest/auth_digest.cc' --- src/auth/digest/auth_digest.cc 2012-06-07 10:27:46 +0000 +++ src/auth/digest/auth_digest.cc 2012-07-02 07:29:30 +0000 @@ -186,7 +186,7 @@ /* create a new nonce */ newnonce->noncedata.randomdata = squid_random(); /* Bug 3526 high performance fix: add 1 second to creationtime to avoid duplication */ - newnonce->noncedata.creationtime++; + ++newnonce->noncedata.creationtime; authDigestNonceEncode(newnonce); } @@ -298,7 +298,7 @@ authDigestNonceLink(digest_nonce_h * nonce) { assert(nonce != NULL); - nonce->references++; + ++nonce->references; debugs(29, 9, "authDigestNonceLink: nonce '" << nonce << "' now at '" << nonce->references << "'."); } @@ -379,7 +379,7 @@ /* is the nonce-count ok ? */ if (!static_cast(Auth::Config::Find("digest"))->CheckNonceCount) { - nonce->nc++; + ++nonce->nc; return -1; /* forced OK by configuration */ } @@ -796,11 +796,11 @@ /* trim DIGEST from string */ while (xisgraph(*proxy_auth)) - proxy_auth++; + ++proxy_auth; /* Trim leading whitespace before decoding */ while (xisspace(*proxy_auth)) - proxy_auth++; + ++proxy_auth; String temp(proxy_auth); === modified file 'src/auth/negotiate/UserRequest.cc' --- src/auth/negotiate/UserRequest.cc 2012-06-19 23:16:13 +0000 +++ src/auth/negotiate/UserRequest.cc 2012-07-02 07:29:45 +0000 @@ -179,13 +179,13 @@ if (blob) { while (xisspace(*blob) && *blob) - blob++; + ++blob; while (!xisspace(*blob) && *blob) - blob++; + ++blob; while (xisspace(*blob) && *blob) - blob++; + ++blob; } switch (user()->credentials()) { === modified file 'src/auth/ntlm/UserRequest.cc' --- src/auth/ntlm/UserRequest.cc 2012-06-19 23:16:13 +0000 +++ src/auth/ntlm/UserRequest.cc 2012-07-02 07:32:58 +0000 @@ -173,13 +173,13 @@ /* if proxy_auth is actually NULL, we'd better not manipulate it. */ if (blob) { while (xisspace(*blob) && *blob) - blob++; + ++blob; while (!xisspace(*blob) && *blob) - blob++; + ++blob; while (xisspace(*blob) && *blob) - blob++; + ++blob; } switch (user()->credentials()) { @@ -262,7 +262,7 @@ /* seperate out the useful data */ blob = strchr(reply, ' '); if (blob) - blob++; + ++blob; if (strncasecmp(reply, "TT ", 3) == 0) { /* we have been given a blob to send to the client */ === modified file 'src/base/TextException.cc' --- src/base/TextException.cc 2012-01-20 18:55:04 +0000 +++ src/base/TextException.cc 2012-07-02 07:39:18 +0000 @@ -51,12 +51,12 @@ s = strrchr(fname, '/'); if (s) - s++; + ++s; else s = fname; while (*s) { - j++; + ++j; n ^= 271 * (unsigned) *s++; } i = n ^ (j * 271); === modified file 'src/comm/AcceptLimiter.cc' --- src/comm/AcceptLimiter.cc 2012-01-20 18:55:04 +0000 +++ src/comm/AcceptLimiter.cc 2012-07-02 09:27:38 +0000 @@ -14,7 +14,7 @@ void Comm::AcceptLimiter::defer(Comm::TcpAcceptor *afd) { - afd->isLimited++; + ++afd->isLimited; debugs(5, 5, HERE << afd->conn << " x" << afd->isLimited); deferred.push_back(afd); } @@ -22,7 +22,7 @@ void Comm::AcceptLimiter::removeDead(const Comm::TcpAcceptor *afd) { - for (unsigned int i = 0; i < deferred.size() && afd->isLimited > 0; i++) { + for (unsigned int i = 0; i < deferred.size() && afd->isLimited > 0; ++i) { if (deferred[i] == afd) { deferred[i]->isLimited--; deferred[i] = NULL; // fast. kick() will skip empty entries later. === modified file 'src/comm/ConnOpener.cc' --- src/comm/ConnOpener.cc 2012-06-12 14:41:36 +0000 +++ src/comm/ConnOpener.cc 2012-07-02 07:53:00 +0000 @@ -203,7 +203,7 @@ * even if the connection may fail. */ if (conn_->getPeer()) - conn_->getPeer()->stats.conn_open++; + ++conn_->getPeer()->stats.conn_open; lookupLocalAddress(); @@ -228,7 +228,7 @@ if (callback_ == NULL || callback_->canceled()) return; - totalTries_++; + ++totalTries_; switch (comm_connect_addr(temporaryFd_, conn_->remote) ) { @@ -252,7 +252,7 @@ break; default: - failRetries_++; + ++failRetries_; // check for timeout FIRST. if (squid_curtime - connectStart_ > connectTimeout_) { === modified file 'src/comm/IoCallback.cc' --- src/comm/IoCallback.cc 2012-01-20 18:55:04 +0000 +++ src/comm/IoCallback.cc 2012-07-02 09:27:53 +0000 @@ -14,7 +14,7 @@ { // XXX: convert this to a std::map<> ? iocb_table = static_cast(xcalloc(Squid_MaxFD, sizeof(CbEntry))); - for (int pos = 0; pos < Squid_MaxFD; pos++) { + for (int pos = 0; pos < Squid_MaxFD; ++pos) { iocb_table[pos].fd = pos; iocb_table[pos].readcb.type = IOCB_READ; iocb_table[pos].writecb.type = IOCB_WRITE; @@ -25,7 +25,7 @@ Comm::CallbackTableDestruct() { // release any Comm::Connections being held. - for (int pos = 0; pos < Squid_MaxFD; pos++) { + for (int pos = 0; pos < Squid_MaxFD; ++pos) { iocb_table[pos].readcb.conn = NULL; iocb_table[pos].writecb.conn = NULL; } === modified file 'src/comm/ModDevPoll.cc' --- src/comm/ModDevPoll.cc 2012-01-20 18:55:04 +0000 +++ src/comm/ModDevPoll.cc 2012-07-02 09:28:02 +0000 @@ -165,7 +165,7 @@ comm_flush_updates(); /* Push new event onto array */ - devpoll_update.cur++; + ++devpoll_update.cur; devpoll_update.pfds[devpoll_update.cur].fd = fd; devpoll_update.pfds[devpoll_update.cur].events = events; devpoll_update.pfds[devpoll_update.cur].revents = 0; @@ -385,7 +385,7 @@ PROF_start(comm_handle_ready_fd); - for (i = 0; i < num; i++) { + for (i = 0; i < num; ++i) { int fd = (int)do_poll.dp_fds[i].fd; F = &fd_table[fd]; debugs( @@ -421,7 +421,7 @@ F->read_handler = NULL; hdl(fd, F->read_data); PROF_stop(comm_read_handler); - statCounter.select_fds++; + ++statCounter.select_fds; } else { debugs( 5, @@ -445,7 +445,7 @@ F->write_handler = NULL; hdl(fd, F->write_data); PROF_stop(comm_write_handler); - statCounter.select_fds++; + ++statCounter.select_fds; } else { debugs( 5, === modified file 'src/comm/ModEpoll.cc' --- src/comm/ModEpoll.cc 2012-01-20 18:55:04 +0000 +++ src/comm/ModEpoll.cc 2012-07-02 09:28:11 +0000 @@ -283,7 +283,7 @@ PROF_start(comm_handle_ready_fd); - for (i = 0, cevents = pevents; i < num; i++, cevents++) { + for (i = 0, cevents = pevents; i < num; ++i, ++cevents) { fd = cevents->data.fd; F = &fd_table[fd]; debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "got FD " << fd << " events=" << @@ -300,7 +300,7 @@ F->read_handler = NULL; hdl(fd, F->read_data); PROF_stop(comm_write_handler); - statCounter.select_fds++; + ++statCounter.select_fds; } else { debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "no read handler for FD " << fd); // remove interest since no handler exist for this event. @@ -315,7 +315,7 @@ F->write_handler = NULL; hdl(fd, F->write_data); PROF_stop(comm_read_handler); - statCounter.select_fds++; + ++statCounter.select_fds; } else { debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "no write handler for FD " << fd); // remove interest since no handler exist for this event. === modified file 'src/comm/ModKqueue.cc' --- src/comm/ModKqueue.cc 2012-03-07 12:37:54 +0000 +++ src/comm/ModKqueue.cc 2012-07-02 09:28:21 +0000 @@ -148,7 +148,7 @@ kqoff = 0; } else { - kqoff++; + ++kqoff; } } } @@ -282,7 +282,7 @@ if (num == 0) return COMM_OK; /* No error.. */ - for (i = 0; i < num; i++) { + for (i = 0; i < num; ++i) { int fd = (int) ke[i].ident; PF *hdl = NULL; fde *F = &fd_table[fd]; === modified file 'src/comm/ModPoll.cc' --- src/comm/ModPoll.cc 2012-04-26 01:04:17 +0000 +++ src/comm/ModPoll.cc 2012-07-02 08:15:22 +0000 @@ -231,7 +231,7 @@ pfds[npfds].fd = fd; pfds[npfds].events = events; pfds[npfds].revents = 0; - npfds++; + ++npfds; } } @@ -241,14 +241,14 @@ } getCurrentTime(); - statCounter.syscalls.selects++; + ++statCounter.syscalls.selects; if (poll(pfds, npfds, 0) < 1) { PROF_stop(comm_check_incoming); return incoming_sockets_accepted; } - for (i = 0; i < npfds; i++) { + for (i = 0; i < npfds; ++i) { int revents; if (((revents = pfds[i].revents) == 0) || ((fd = pfds[i].fd) == -1)) @@ -396,10 +396,10 @@ pfds[nfds].fd = i; pfds[nfds].events = events; pfds[nfds].revents = 0; - nfds++; + ++nfds; if ((events & POLLRDNORM) && fd_table[i].flags.read_pending) - npending++; + ++npending; } } @@ -498,7 +498,7 @@ F->flags.read_pending = 0; hdl(fd, F->read_data); PROF_stop(comm_read_handler); - statCounter.select_fds++; + ++statCounter.select_fds; if (commCheckUdpIncoming) comm_poll_udp_incoming(); @@ -519,7 +519,7 @@ F->write_handler = NULL; hdl(fd, F->write_data); PROF_stop(comm_write_handler); - statCounter.select_fds++; + ++statCounter.select_fds; if (commCheckUdpIncoming) comm_poll_udp_incoming(); === modified file 'src/comm/ModSelect.cc' --- src/comm/ModSelect.cc 2012-04-25 05:29:20 +0000 +++ src/comm/ModSelect.cc 2012-07-02 08:14:45 +0000 @@ -238,12 +238,12 @@ getCurrentTime(); - statCounter.syscalls.selects++; + ++statCounter.syscalls.selects; if (select(maxfd, &read_mask, &write_mask, NULL, &zero_tv) < 1) return incoming_sockets_accepted; - for (i = 0; i < nfds; i++) { + for (i = 0; i < nfds; ++i) { fd = fds[i]; if (FD_ISSET(fd, &read_mask)) { === modified file 'src/snmp_core.cc' --- src/snmp_core.cc 2012-04-25 05:29:20 +0000 +++ src/snmp_core.cc 2012-06-28 06:57:58 +0000 @@ -765,7 +765,7 @@ int no = name[current->len] ; int i; // Note: This works because the Config.peers keeps its index according to its position. - for ( i=0 ; peers && (i < no) ; peers = peers->next , i++ ) ; + for ( i=0 ; peers && (i < no) ; peers = peers->next , ++i ) ; if (peers) { debugs(49, 6, "snmp peer_Inst: Encode peer #" << i); === modified file 'tools/purge/purge.cc' --- tools/purge/purge.cc 2012-01-20 18:55:04 +0000 +++ tools/purge/purge.cc 2012-06-28 06:57:58 +0000 @@ -267,7 +267,7 @@ if ( meta && (findings = meta->search( STORE_META_KEY_MD5 )) ) { unsigned char* s = (unsigned char*) findings->data; - for ( int j=0; j<16; j++, s++ ) { + for ( int j=0; j<16; ++j, ++s ) { md5[j*2+0] = hexdigit[ *s >> 4 ]; md5[j*2+1] = hexdigit[ *s & 15 ]; }