------------------------------------------------------------ revno: 12191 revision-id: kinkie@squid-cache.org-20120702121407-2vu4h33k3b28v2dz parent: squid3@treenet.co.nz-20120702015003-en8clgpb5an3i75s committer: Francesco Chemolli branch nick: trunk timestamp: Mon 2012-07-02 14:14:07 +0200 message: Change increment and decrement operators from postfix to prefix form. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: kinkie@squid-cache.org-20120702121407-2vu4h33k3b28v2dz # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: c53b49f420e2bd277542c25b3e0c538d0e2a9cb9 # timestamp: 2012-07-02 12:52:27 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20120702015003-\ # en8clgpb5an3i75s # # Begin patch === modified file 'compat/strnstr.cc' --- compat/strnstr.cc 2012-01-20 18:55:04 +0000 +++ compat/strnstr.cc 2012-07-02 12:14:07 +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 12:14:07 +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 12:14:07 +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-07-02 12:14:07 +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 12:14:07 +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 12:14:07 +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 12:14:07 +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/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 12:14:07 +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 12:14:07 +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-07-02 12:14:07 +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 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14: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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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-07-02 12:14:07 +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 12:14:07 +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 12:14:07 +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 12:14:07 +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) {