]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Changed increment operators from postfix to prefix form.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 23 Jul 2012 15:34:12 +0000 (17:34 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 23 Jul 2012 15:34:12 +0000 (17:34 +0200)
21 files changed:
src/HttpHdrCc.cc
src/HttpHdrSc.cc
src/HttpHeader.cc
src/cache_cf.cc
src/carp.cc
src/client_side.cc
src/errorpage.cc
src/external_acl.cc
src/format/Format.cc
src/format/Quoting.cc
src/format/Token.cc
src/fqdncache.cc
src/fs/ufs/store_dir_ufs.cc
src/ftp.cc
src/gopher.cc
src/helper.cc
src/icmp/net_db.cc
src/log/ModSyslog.cc
src/ssl/ErrorDetail.cc
src/ssl/context_storage.cc
src/ssl/gadgets.cc

index 4d86e7e461c9fb8ac1e255bb8f351de14184f6b6..4b77ebec274362a9dcd7a1b021c519784dec202f 100644 (file)
@@ -121,10 +121,12 @@ HttpHdrCc::parse(const String & str)
     while (strListGetItem(&str, ',', &item, &ilen, &pos)) {
         /* isolate directive name */
 
-        if ((p = (const char *)memchr(item, '=', ilen)) && (p - item < ilen))
-            nlen = p++ - item;
-        else
+        if ((p = (const char *)memchr(item, '=', ilen)) && (p - item < ilen)) {
+            nlen = p - item;
+            ++p;
+        } else {
             nlen = ilen;
+        }
 
         /* find type */
         const CcNameToIdMap_t::const_iterator i=CcNameToIdMap.find(StringArea(item,nlen));
index fdd5a4a37d5a5a4dfa2cdaad164045a95a154ce1..34e94f3bb39097f02f7b94271ce15b003c0920f0 100644 (file)
@@ -140,8 +140,10 @@ HttpHdrSc::parse(const String * str)
         }
 
         /* decrease ilen to still match the token for ';' qualified non '=' statments */
-        else if ((p = strchr(item, ';')) && (p - item < ilen))
-            ilen = p++ - item;
+        else if ((p = strchr(item, ';')) && (p - item < ilen)) {
+            ilen = p - item;
+            ++p;
+        }
 
         /* find type */
         /* TODO: use a type-safe map-based lookup */
index edeb9c640d27bdb3801e18e6a0a0e325b309db0f..4e8a8228e54565e1f13a3d3a3b5bf4a872c1fd2e 100644 (file)
@@ -596,8 +596,10 @@ HttpHeader::parse(const char *header_start, const char *header_end)
                 if (Config.onoff.relaxed_header_parser) {
                     char *p = (char *) this_line;      /* XXX Warning! This destroys original header content and violates specifications somewhat */
 
-                    while ((p = (char *)memchr(p, '\r', field_end - p)) != NULL)
-                        *p++ = ' ';
+                    while ((p = (char *)memchr(p, '\r', field_end - p)) != NULL) {
+                        *p = ' ';
+                        ++p;
+                    }
                 } else
                     goto reset;
             }
index e46ba0e60c196f3e34d81f2f65870ad223b75930..2360ec5353700a92bdfccb2d3796540c043eb56f 100644 (file)
@@ -247,7 +247,7 @@ update_maxobjsize(void)
     int i;
     int64_t ms = -1;
 
-    for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+    for (i = 0; i < Config.cacheSwap.n_configured; ++i) {
         assert (Config.cacheSwap.swapDirs[i].getRaw());
 
         if (dynamic_cast<SwapDir *>(Config.cacheSwap.swapDirs[i].getRaw())->
@@ -295,7 +295,7 @@ parseManyConfigFiles(char* files, int depth)
                    path, xstrerror());
         }
     }
-    for (i = 0; i < (int)globbuf.gl_pathc; i++) {
+    for (i = 0; i < (int)globbuf.gl_pathc; ++i) {
         error_count += parseOneConfigFile(globbuf.gl_pathv[i], depth);
     }
     globfree(&globbuf);
@@ -453,7 +453,7 @@ parseOneConfigFile(const char *file_name, unsigned int depth)
 
     Vector<bool> if_states;
     while (fgets(config_input_line, BUFSIZ, fp)) {
-        config_lineno++;
+        ++config_lineno;
 
         if ((token = strchr(config_input_line, '\n')))
             *token = '\0';
@@ -477,7 +477,7 @@ parseOneConfigFile(const char *file_name, unsigned int depth)
                 continue;      /* Not a valid #line directive, may be a comment */
 
             while (*file && xisspace((unsigned char) *file))
-                file++;
+                ++file;
 
             if (*file) {
                 if (*file != '"')
@@ -538,7 +538,7 @@ parseOneConfigFile(const char *file_name, unsigned int depth)
                 err_count += parseManyConfigFiles(tmp_line + 8, depth + 1);
             } else if (!parse_line(tmp_line)) {
                 debugs(3, 0, HERE << cfg_filename << ":" << config_lineno << " unrecognized: '" << tmp_line << "'");
-                err_count++;
+                ++err_count;
             }
         }
 
@@ -1188,7 +1188,7 @@ static void parseBytesOptionValue(size_t * bptr, const char *units, char const *
     char const * number_end = value;
 
     while ((*number_end >= '0' && *number_end <= '9')) {
-        number_end++;
+        ++number_end;
     }
 
     String number;
@@ -1757,7 +1757,7 @@ dump_cachedir(StoreEntry * entry, const char *name, SquidConfig::_cacheSwap swap
     int i;
     assert (entry);
 
-    for (i = 0; i < swap.n_configured; i++) {
+    for (i = 0; i < swap.n_configured; ++i) {
         s = dynamic_cast<SwapDir *>(swap.swapDirs[i].getRaw());
         if (!s) continue;
         storeAppendPrintf(entry, "%s %s %s", name, s->type(), s->path);
@@ -1866,7 +1866,7 @@ parse_cachedir(SquidConfig::_cacheSwap * swap)
 
     /* reconfigure existing dir */
 
-    for (i = 0; i < swap->n_configured; i++) {
+    for (i = 0; i < swap->n_configured; ++i) {
         assert (swap->swapDirs[i].getRaw());
 
         if ((strcasecmp(path_str, dynamic_cast<SwapDir *>(swap->swapDirs[i].getRaw())->path)) == 0) {
@@ -2129,8 +2129,10 @@ parse_peer(peer ** head)
             char *mode, *nextmode;
             for (mode = nextmode = tmp; mode; mode = nextmode) {
                 nextmode = strchr(mode, ',');
-                if (nextmode)
-                    *nextmode++ = '\0';
+                if (nextmode) {
+                    *nextmode = '\0';
+                    ++nextmode;
+                }
                 if (!strcasecmp(mode, "no-clr")) {
                     if (p->options.htcp_only_clr)
                         fatalf("parse_peer: can't set htcp-no-clr and htcp-only-clr simultaneously");
@@ -2497,7 +2499,7 @@ parse_hostdomain(void)
 
         if (*domain == '!') {  /* check for !.edu */
             l->do_ping = 0;
-            domain++;
+            ++domain;
         }
 
         l->domain = xstrdup(domain);
@@ -2939,7 +2941,7 @@ parse_eol(char *volatile *var)
     }
 
     while (*token && xisspace(*token))
-        token++;
+        ++token;
 
     if (!*token) {
         self_destruct();
@@ -3451,7 +3453,8 @@ parsePortSpecification(AnyP::PortCfg * s, char *token)
             debugs(3, DBG_CRITICAL, s->protocol << "_port: missing ']' on IPv6 address: " << token);
             self_destruct();
         }
-        *t++ = '\0';
+        *t = '\0';
+        ++t;
         if (*t != ':') {
             debugs(3, DBG_CRITICAL, s->protocol << "_port: missing Port in: " << token);
             self_destruct();
@@ -3637,12 +3640,12 @@ parse_port_option(AnyP::PortCfg * s, char *token)
         s->tcp_keepalive.idle = atoi(t);
         t = strchr(t, ',');
         if (t) {
-            t++;
+            ++t;
             s->tcp_keepalive.interval = atoi(t);
             t = strchr(t, ',');
         }
         if (t) {
-            t++;
+            ++t;
             s->tcp_keepalive.timeout = atoi(t);
             t = strchr(t, ',');
         }
@@ -4353,7 +4356,7 @@ static void parse_sslproxy_cert_adapt(sslproxy_cert_adapt **cert_adapt)
     const char *param;
     if ( char *s = strchr(al, '{')) {
         *s = '\0'; // terminate the al string
-        s++;
+        ++s;
         param = s;
         s = strchr(s, '}');
         if (!s) {
index d0554b56130b0eaafc43911f7252d6c775779dcd..ae5a423d93ac816826ad2e137549250c216dd2b3 100644 (file)
@@ -128,7 +128,8 @@ carpInit(void)
             p->carp.load_factor = 0.0;
 
         /* add it to our list of peers */
-        *P++ = cbdataReference(p);
+        *P = cbdataReference(p);
+        ++P;
     }
 
     /* Sort our list on weight */
index 218943de84cf8c5bc1d10f2909c5539a81ebcd8d..946ffd7a5fceaaa6f03dfff9de112d74fe11edf5 100644 (file)
@@ -1979,8 +1979,10 @@ setLogUri(ClientHttpRequest * http, char const *uri, bool cleanUrl)
             char *q = tmp_uri;
             t = uri;
             while (*t) {
-                if (!xisspace(*t))
-                    *q++ = *t;
+                if (!xisspace(*t)) {
+                    *q = *t;
+                    ++q;
+                }
                 ++t;
             }
             *q = '\0';
@@ -4025,7 +4027,8 @@ clientHttpConnectionsOpen(void)
                                         ListeningStartedDialer(&clientListenerConnectionOpened, s, Ipc::fdnHttpSocket, sub));
         Ipc::StartListening(SOCK_STREAM, IPPROTO_TCP, s->listenConn, Ipc::fdnHttpSocket, listenCall);
 
-        HttpSockets[NHttpSockets++] = -1; // set in clientListenerConnectionOpened
+        HttpSockets[NHttpSockets] = -1; // set in clientListenerConnectionOpened
+        ++NHttpSockets;
     }
 }
 
@@ -4079,7 +4082,8 @@ clientHttpsConnectionsOpen(void)
                                         ListeningStartedDialer(&clientListenerConnectionOpened,
                                                                s, Ipc::fdnHttpsSocket, sub));
         Ipc::StartListening(SOCK_STREAM, IPPROTO_TCP, s->listenConn, Ipc::fdnHttpsSocket, listenCall);
-        HttpSockets[NHttpSockets++] = -1;
+        HttpSockets[NHttpSockets] = -1;
+        ++NHttpSockets;
     }
 }
 #endif
index ae29c56f0b9a7f3dcec51647f2b16056f568fe23..a6efcdceb3e0841acdf1a483da569d82e556296e 100644 (file)
@@ -414,7 +414,8 @@ bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &p
             }
             ++pos;
         }
-        *dt++ = '\0'; // nul-terminated the filename content string before system use.
+        *dt = '\0'; // nul-terminated the filename content string before system use.
+        ++dt;
 
         debugs(4, 9, HERE << "STATE: dt='" << dt << "', lang='" << lang << "', pos=" << pos << ", buf='" << ((pos < hdr.size()) ? hdr.substr(pos,hdr.size()) : "") << "'");
 
index fdf15a27cfbcde28bb88eb9f3058b08b06fa5934..c173798001c0ce95383cd5ceb72f8d5b9e721b69 100644 (file)
@@ -264,12 +264,15 @@ parse_header_token(external_acl_format *format, char *header, const _external_ac
 
     if (member) {
         /* Split in header and member */
-        *member++ = '\0';
+        *member = '\0';
+        ++member;
 
-        if (!xisalnum(*member))
-            format->separator = *member++;
-        else
+        if (!xisalnum(*member)) {
+            format->separator = *member;
+            ++member;
+        } else {
             format->separator = ',';
+        }
 
         format->member = xstrdup(member);
 
@@ -1333,7 +1336,8 @@ externalAclHandleReply(void *data, char *reply)
             value = strchr(token, '=');
 
             if (value) {
-                *value++ = '\0';       /* terminate the token, and move up to the value */
+                *value = '\0'; /* terminate the token, and move up to the value */
+                ++value;
 
                 if (state->def->quote == external_acl::QUOTE_METHOD_URL)
                     rfc1738_unescape(value);
index 12fa129110d676962a95c1b38e36eaf24084952a..bfd4f0455bbbfbb07df77603815ff22ac5944e13 100644 (file)
@@ -262,26 +262,34 @@ log_quoted_string(const char *str, char *out)
             break;
 
         case '\r':
-            *p++ = '\\';
-            *p++ = 'r';
+            *p = '\\';
+            ++p;
+            *p = 'r';
+            ++p;
             ++str;
             break;
 
         case '\n':
-            *p++ = '\\';
-            *p++ = 'n';
+            *p = '\\';
+            ++p;
+            *p = 'n';
+            ++p;
             ++str;
             break;
 
         case '\t':
-            *p++ = '\\';
-            *p++ = 't';
+            *p = '\\';
+            ++p;
+            *p = 't';
+            ++p;
             ++str;
             break;
 
         default:
-            *p++ = '\\';
-            *p++ = *str;
+            *p = '\\';
+            ++p;
+            *p = *str;
+            ++p;
             ++str;
             break;
         }
index 6568941ecd8c080e22f7a85bab60aa508e969c4f..c27c7b053252c7e718a64eeb00829c8845a00ea1 100644 (file)
@@ -116,11 +116,15 @@ Format::QuoteMimeBlob(const char *header)
     while ((c = *(const unsigned char *) header++) != '\0') {
 #if !OLD_LOG_MIME
         if (c == '\r') {
-            *buf_cursor++ = '\\';
-            *buf_cursor++ = 'r';
+            *buf_cursor = '\\';
+            ++buf_cursor;
+            *buf_cursor = 'r';
+            ++buf_cursor;
         } else if (c == '\n') {
-            *buf_cursor++ = '\\';
-            *buf_cursor++ = 'n';
+            *buf_cursor = '\\';
+            ++buf_cursor;
+            *buf_cursor = 'n';
+            ++buf_cursor;
         } else
 #endif
             if (c <= 0x1F
@@ -143,19 +147,25 @@ Format::QuoteMimeBlob(const char *header)
 #endif
                     || c == '['
                     || c == ']') {
-                *buf_cursor++ = '%';
+                *buf_cursor = '%';
+                ++buf_cursor;
                 i = c * 2;
-                *buf_cursor++ = c2x[i];
-                *buf_cursor++ = c2x[i + 1];
+                *buf_cursor = c2x[i];
+                ++buf_cursor;
+                *buf_cursor = c2x[i + 1];
+                ++buf_cursor;
 #if !OLD_LOG_MIME
 
             } else if (c == '\\') {
-                *buf_cursor++ = '\\';
-                *buf_cursor++ = '\\';
+                *buf_cursor = '\\';
+                ++buf_cursor;
+                *buf_cursor = '\\';
+                ++buf_cursor;
 #endif
 
             } else {
-                *buf_cursor++ = (char) c;
+                *buf_cursor = (char) c;
+                ++buf_cursor;
             }
     }
 
index 087a526ee1e9c910a5cc8ecfb4534bb6cbb1b22a..4922099beec90ecf38da66fa429edc34e37ef6dc 100644 (file)
@@ -429,12 +429,15 @@ done:
             char *cp = strchr(header, ':');
 
             if (cp) {
-                *cp++ = '\0';
+                *cp = '\0';
+                ++cp;
 
-                if (*cp == ',' || *cp == ';' || *cp == ':')
-                    data.header.separator = *cp++;
-                else
+                if (*cp == ',' || *cp == ';' || *cp == ':') {
+                    data.header.separator = *cp;
+                    ++cp;
+                } else {
                     data.header.separator = ',';
+                }
 
                 data.header.element = cp;
 
index e17ae7ae19477b5aad87a7e39f8bdb936b2773ac..0bb40a85c9882c58f9bfb3147674ddc8978d9d8a 100644 (file)
@@ -455,7 +455,8 @@ fqdncacheParse(fqdncache_entry *f, const rfc1035_rr * answers, int nr, const cha
                 continue;
             }
 
-            f->names[f->name_count++] = xstrdup(answers[k].rdata);
+            f->names[f->name_count] = xstrdup(answers[k].rdata);
+            ++ f->name_count;
         } else if (answers[k].type != RFC1035_TYPE_CNAME)
             continue;
 
index 33467c41eb2c95167a7cba19f2a11ad4daf16bab..ef183af47105350d9ba5c1add6947f1454f4ad74 100644 (file)
@@ -1145,7 +1145,8 @@ UFSSwapDir::DirClean(int swap_index)
                 if (UFSSwapDir::FilenoBelongsHere(fn, D0, D1, D2))
                     continue;
 
-        files[k++] = swapfileno;
+        files[k] = swapfileno;
+        ++k;
     }
 
     closedir(dir_pointer);
@@ -1201,7 +1202,8 @@ UFSSwapDir::CleanEvent(void *unused)
 
             assert (usd);
 
-            UFSDirToGlobalDirMapping[n++] = i;
+            UFSDirToGlobalDirMapping[n] = i;
+            ++n;
 
             j += (usd->l1 * usd->l2);
         }
index e440e418dcd9ed2e5a5fa36b1f37e50b90a94dfd..18c7ee80a28a01f90e5d348a627d412260b464e3 100644 (file)
@@ -779,8 +779,10 @@ ftpListParseParts(const char *buf, struct _ftp_flags flags)
         return p;
     }
 
-    for (t = strtok(xbuf, w_space); t && n_tokens < MAX_TOKENS; t = strtok(NULL, w_space))
-        tokens[n_tokens++] = xstrdup(t);
+    for (t = strtok(xbuf, w_space); t && n_tokens < MAX_TOKENS; t = strtok(NULL, w_space)) {
+        tokens[n_tokens] = xstrdup(t);
+        ++n_tokens;
+    }
 
     xfree(xbuf);
 
@@ -1564,13 +1566,17 @@ escapeIAC(const char *buf)
     ret = (char *)xmalloc(n);
 
     for (p = (unsigned const char *)buf, r=(unsigned char *)ret; *p; ++p) {
-        *r++ = *p;
+        *r = *p;
+        ++r;
 
-        if (*p == 255)
-            *r++ = 255;
+        if (*p == 255) {
+            *r = 255;
+            ++r;
+        }
     }
 
-    *r++ = '\0';
+    *r = '\0';
+    ++r;
     assert((r - (unsigned char *)ret) == n );
     return ret;
 }
@@ -2105,8 +2111,10 @@ ftpReadType(FtpStateData * ftpState)
             d = p;
             p += strcspn(p, "/");
 
-            if (*p)
-                *p++ = '\0';
+            if (*p) {
+                *p = '\0';
+                ++p;
+            }
 
             rfc1738_unescape(d);
 
index 83b534fd4ed3a5813839970bdf9c551c7c5b11ea..598195adb81ab4da6e3b998d2c673aabaae6e389 100644 (file)
@@ -498,11 +498,13 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len)
             selector = strchr(tline, TAB);
 
             if (selector) {
-                *selector++ = '\0';
+                *selector = '\0';
+                ++selector;
                 host = strchr(selector, TAB);
 
                 if (host) {
-                    *host++ = '\0';
+                    *host = '\0';
+                    ++host;
                     port = strchr(host, TAB);
 
                     if (port) {
index 7ff7b6ebe1139920987e2fccd2e16968ff6633fc..f554ff64787aef4652df3f4ff5ee1ca9cba4defa 100644 (file)
@@ -182,12 +182,16 @@ helperOpenServers(helper * hlp)
 
     snprintf(procname, strlen(shortname) + 3, "(%s)", shortname);
 
-    args[nargs++] = procname;
+    args[nargs] = procname;
+    ++nargs;
 
-    for (w = hlp->cmdline->next; w && nargs < HELPER_MAX_ARGS; w = w->next)
-        args[nargs++] = w->key;
+    for (w = hlp->cmdline->next; w && nargs < HELPER_MAX_ARGS; w = w->next) {
+        args[nargs] = w->key;
+        ++nargs;
+    }
 
-    args[nargs++] = NULL;
+    args[nargs] = NULL;
+    ++nargs;
 
     assert(nargs <= HELPER_MAX_ARGS);
 
@@ -296,12 +300,16 @@ helperStatefulOpenServers(statefulhelper * hlp)
 
     snprintf(procname, strlen(shortname) + 3, "(%s)", shortname);
 
-    args[nargs++] = procname;
+    args[nargs] = procname;
+    ++nargs;
 
-    for (wordlist *w = hlp->cmdline->next; w && nargs < HELPER_MAX_ARGS; w = w->next)
-        args[nargs++] = w->key;
+    for (wordlist *w = hlp->cmdline->next; w && nargs < HELPER_MAX_ARGS; w = w->next) {
+        args[nargs] = w->key;
+        ++nargs;
+    }
 
-    args[nargs++] = NULL;
+    args[nargs] = NULL;
+    ++nargs;
 
     assert(nargs <= HELPER_MAX_ARGS);
 
@@ -899,7 +907,8 @@ helperHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, com
         if (t > srv->rbuf && t[-1] == '\r' && hlp->eom == '\n')
             t[-1] = '\0';
 
-        *t++ = '\0';
+        *t = '\0';
+        ++t;
 
         if (hlp->childs.concurrency) {
             i = strtol(msg, &msg, 10);
index bf4def3101191a61bbde3f817f41ad3c4182237f..6e88bddfcaeee13fa5793ec515e43f28f1bf2c27 100644 (file)
@@ -1018,8 +1018,10 @@ netdbDump(StoreEntry * sentry)
     i = 0;
     hash_first(addr_table);
 
-    while ((n = (netdbEntry *) hash_next(addr_table)))
-        *(list + i++) = n;
+    while ((n = (netdbEntry *) hash_next(addr_table))) {
+        *(list + i) = n;
+        ++i;
+    }
 
     if (i != memInUse(MEM_NETDBENTRY))
         debugs(38, 0, "WARNING: netdb_addrs count off, found " << i <<
@@ -1245,14 +1247,16 @@ netdbBinaryExchange(StoreEntry * s)
         if ( !addr.IsIPv4() )
             continue;
 
-        buf[i++] = (char) NETDB_EX_NETWORK;
+        buf[i] = (char) NETDB_EX_NETWORK;
+        ++i;
 
         addr.GetInAddr(line_addr);
         memcpy(&buf[i], &line_addr, sizeof(struct in_addr));
 
         i += sizeof(struct in_addr);
 
-        buf[i++] = (char) NETDB_EX_RTT;
+        buf[i] = (char) NETDB_EX_RTT;
+        ++i;
 
         j = htonl((int) (n->rtt * 1000));
 
@@ -1260,7 +1264,8 @@ netdbBinaryExchange(StoreEntry * s)
 
         i += sizeof(int);
 
-        buf[i++] = (char) NETDB_EX_HOPS;
+        buf[i] = (char) NETDB_EX_HOPS;
+        ++i;
 
         j = htonl((int) (n->hops * 1000));
 
index fa7e6dc0b5db6bd9b594875c7c5dbbd4f4dc2159..77e739e74790787aa012b403ecccddeac5b104b8 100644 (file)
@@ -178,7 +178,8 @@ logfile_mod_syslog_open(Logfile * lf, const char *path, size_t bufsz, int fatal_
         if (!facility)
             facility = (char *) strchr(priority, '|');
         if (facility) {
-            *facility++ = '\0';
+            *facility = '\0';
+            ++facility;
             ll->syslog_priority |= syslog_ntoa(facility);
         }
         ll->syslog_priority |= syslog_ntoa(priority);
index 4b6cc06d153bb64a7b68f12ceb1918b86f3deb0a..31eb8edf33fd42f657407fd3813fb359fd3483a2 100644 (file)
@@ -140,7 +140,7 @@ static void loadSslErrorMap()
 static void loadSslErrorShortcutsMap()
 {
     assert(TheSslErrorShortcuts.empty());
-    for (int i = 0; TheSslErrorShortcutsArray[i].name; i++)
+    for (int i = 0; TheSslErrorShortcutsArray[i].name; ++i)
         TheSslErrorShortcuts[TheSslErrorShortcutsArray[i].name] = TheSslErrorShortcutsArray[i].errors;
 }
 
@@ -178,7 +178,7 @@ Ssl::ParseErrorString(const char *name)
         // Should not be empty...
         assert(it->second[0] != SSL_ERROR_NONE);
         Ssl::Errors *errors = new Ssl::Errors(it->second[0]);
-        for (int i =1; it->second[i] != SSL_ERROR_NONE; i++) {
+        for (int i =1; it->second[i] != SSL_ERROR_NONE; ++i) {
             errors->push_back_unique(it->second[i]);
         }
         return errors;
index c3dd114a81b98d57d155717f11f5c5f096bbfac1..a1ffb0f3e53b7a4ca9d889455d6da7a458c7fe9f 100644 (file)
@@ -171,7 +171,7 @@ void Ssl::GlobalContextStorage::reconfigureFinish()
         }
 
         // add new local storages.
-        for (std::map<Ip::Address, size_t>::iterator conf_i = configureStorage.begin(); conf_i != configureStorage.end(); conf_i++ ) {
+        for (std::map<Ip::Address, size_t>::iterator conf_i = configureStorage.begin(); conf_i != configureStorage.end(); ++conf_i ) {
             if (storage.find(conf_i->first) == storage.end()) {
                 storage.insert(std::pair<Ip::Address, LocalContextStorage *>(conf_i->first, new LocalContextStorage(conf_i->second)));
             }
index 2133e2e1097405fcd0176430445b3e01b357fa9a..4610a7c40947f2722100c123bfc35f906a5f15ad 100644 (file)
@@ -620,7 +620,7 @@ bool Ssl::certificateMatchesProperties(X509 *cert, CertificateProperties const &
     bool match = true;
     if (cert1_altnames) {
         int numalts = sk_GENERAL_NAME_num(cert1_altnames);
-        for (int i = 0; match && i < numalts; i++) {
+        for (int i = 0; match && i < numalts; ++i) {
             const GENERAL_NAME *aName = sk_GENERAL_NAME_value(cert1_altnames, i);
             match = sk_GENERAL_NAME_find(cert2_altnames, aName);
         }