]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Changed decrement operators from postfix to prefix form.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 20 Jul 2012 15:31:04 +0000 (17:31 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 20 Jul 2012 15:31:04 +0000 (17:31 +0200)
44 files changed:
src/ClientDelayConfig.cc
src/DelayConfig.cc
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/Mmapped/MmappedFile.cc
src/HttpHeader.cc
src/HttpHeaderTools.cc
src/HttpMsg.cc
src/HttpParser.cc
src/HttpRequest.cc
src/LeakFinder.cc
src/MemBuf.cc
src/cache_cf.cc
src/cache_diff.cc
src/cbdata.cc
src/client_side.cc
src/client_side_request.cc
src/debug.cc
src/dns_internal.cc
src/fd.cc
src/filemap.cc
src/fqdncache.cc
src/ftp.cc
src/helper.cc
src/icp_v2.cc
src/ip/Address.cc
src/ipc_win32.cc
src/ipcache.cc
src/log/ModDaemon.cc
src/log/ModStdio.cc
src/log/access_log.cc
src/neighbors.cc
src/pconn.cc
src/snmp_core.cc
src/ssl/context_storage.cc
src/ssl/support.cc
src/store.cc
src/store_client.cc
src/store_rebuild.cc
src/test_cache_digest.cc
src/unlinkd.cc
src/wccp2.cc
tools/cachemgr.cc
tools/squidclient.cc

index 79f9d8eb7cfbc7f587bb1e5d8acd9ceb0f2bb33b..7ad363e9cdd58ad86572ef9d746594143ebb1aa2 100644 (file)
@@ -66,7 +66,7 @@ void ClientDelayConfig::parsePoolRates()
         return;
     }
 
-    pool--;
+    --pool;
 
     pools[pool].rate = GetInteger();
     pools[pool].highwatermark = GetInteger64();
index f1327911e6e1438adb15ab2e697b45068d1a0062..73830f1ac5977233772d5bafe9731f4e44322c06 100644 (file)
@@ -77,7 +77,7 @@ DelayConfig::parsePoolClass()
         return;
     }
 
-    pool--;
+    --pool;
 
     DelayPools::delay_data[pool].createPool(delay_class_);
 }
@@ -93,7 +93,7 @@ DelayConfig::parsePoolRates()
         return;
     }
 
-    pool--;
+    --pool;
 
     if (!DelayPools::delay_data[pool].theComposite().getRaw()) {
         debugs(3, 0, "parse_delay_pool_rates: Ignoring pool " << pool + 1 << " attempt to set rates with class not set");
index 72a176806a22cac81e18c2fe7e0cd5a38e1e8e55..19f220b44cd007900d0354a655c63c2a14433c9d 100644 (file)
@@ -179,7 +179,7 @@ void
 DiskThreadsDiskFile::openDone(int unused, const char *unused2, int anFD, int errflag)
 {
     debugs(79, 3, "DiskThreadsDiskFile::openDone: FD " << anFD << ", errflag " << errflag);
-    Opening_FD--;
+    --Opening_FD;
 
     fd = anFD;
 
@@ -215,7 +215,7 @@ void DiskThreadsDiskFile::doClose()
         file_close(fd);
 #endif
 
-        store_open_disk_fd--;
+        --store_open_disk_fd;
         fd = -1;
     }
 }
index dffc15c297179e7b3078cb9c93a5bda27856cd96..b27a5d088d5471a4fd126e405b6928e5b7cae006 100644 (file)
@@ -847,7 +847,7 @@ DiskerClose(const String &path)
         file_close(TheFile);
         debugs(79,3, HERE << "rock db closed " << path << ": FD " << TheFile);
         TheFile = -1;
-        store_open_disk_fd--;
+        --store_open_disk_fd;
     }
 }
 
index 52309f18449bd00b961005fb2d13af00fce2fe27..2501d73e9e7f6023750a64bbbbc1a38ac8dfb817 100644 (file)
@@ -108,7 +108,7 @@ void MmappedFile::doClose()
     if (fd >= 0) {
         file_close(fd);
         fd = -1;
-        store_open_disk_fd--;
+        --store_open_disk_fd;
     }
 }
 
index 2db5d00dabbf86f14dd21fb71332170817844d11..edeb9c640d27bdb3801e18e6a0a0e325b309db0f 100644 (file)
@@ -571,7 +571,7 @@ HttpHeader::parse(const char *header_start, const char *header_end)
             ++field_ptr;       /* Move to next line */
 
             if (field_end > this_line && field_end[-1] == '\r') {
-                field_end--;   /* Ignore CR LF */
+                --field_end;   /* Ignore CR LF */
 
                 if (owner == hoRequest && field_end > this_line) {
                     bool cr_only = true;
@@ -1518,7 +1518,7 @@ HttpHeaderEntry::~HttpHeaderEntry()
 
     assert(Headers[id].stat.aliveCount);
 
-    Headers[id].stat.aliveCount--;
+    -- Headers[id].stat.aliveCount;
 
     id = HDR_BAD_HDR;
 }
@@ -1551,7 +1551,7 @@ HttpHeaderEntry::parse(const char *field_start, const char *field_end)
                "NOTICE: Whitespace after header name in '" << getStringPrefix(field_start, field_end) << "'");
 
         while (name_len > 0 && xisspace(field_start[name_len - 1]))
-            name_len--;
+            --name_len;
 
         if (!name_len)
             return NULL;
@@ -1584,7 +1584,7 @@ HttpHeaderEntry::parse(const char *field_start, const char *field_end)
         ++value_start;
 
     while (value_start < field_end && xisspace(field_end[-1]))
-        field_end--;
+        --field_end;
 
     if (field_end - value_start > 65534) {
         /* String must be LESS THAN 64K and it adds a terminating NULL */
index 3900e282017ec9c976538c4847908dc072b09545..c8fc6aa0d33f14f793fd74352820a3a98167d6c0 100644 (file)
@@ -279,7 +279,7 @@ strListGetItem(const String * str, char del, const char **item, int *ilen, const
 
     /* rtrim */
     while (len > 0 && xisspace((*item)[len - 1]))
-        len--;
+        --len;
 
     if (ilen)
         *ilen = len;
index 6ae172909cc5afabc75913b8514b7ce8f6c99cb5..b008db9e0ed73d3b3d7f087c139c7cbedc283e7d 100644 (file)
@@ -76,7 +76,7 @@ httpMsgIsolateHeaders(const char **parse_start, int l, const char **blk_start, c
         assert(**blk_end == '\n');
 
         while (*(*blk_end - 1) == '\r')
-            (*blk_end)--;
+            --(*blk_end);
 
         assert(*(*blk_end - 1) == '\n');
 
index b51f50cc6cd0ce4c8039b7960688e9faba231383..69c926bccf29cc4a818ecb8f55dc39c915c26bd0 100644 (file)
@@ -151,7 +151,7 @@ HttpParser::parseRequestFirstLine()
         // otherwise last whitespace is somewhere after end of URI.
         req.u_end = last_whitespace;
         // crop any trailing whitespace in the area we think of as URI
-        for (; req.u_end >= req.u_start && xisspace(buf[req.u_end]); req.u_end--);
+        for (; req.u_end >= req.u_start && xisspace(buf[req.u_end]); --req.u_end);
     }
     if (req.u_end < req.u_start) {
         request_parse_status = HTTP_BAD_REQUEST; // missing URI
index b5656600fdf0f6f2108e7db4a0f1df80f0890b2d..72be7f9da45f837d56f0a007bb61f5b102237c7d 100644 (file)
@@ -312,7 +312,7 @@ HttpRequest::parseFirstLine(const char *start, const char *end)
         end = ver - 1;
 
         while (xisspace(*end)) // find prev non-space
-            end--;
+            --end;
 
         ++end;                 // back to space
 
index 44de6844402357f269e6870f49955e6165379023..4c49e27c41ac006549cd03273b3785b770de206d 100644 (file)
@@ -96,7 +96,7 @@ LeakFinder::freeSome(void *p, const char *file, int line)
     LeakFinderPtr *c = (LeakFinderPtr *) hash_lookup(table, p);
     assert(c);
     hash_remove_link(table, c);
-    count--;
+    --count;
     delete c;
     dump();
     return p;
index 13ffdefd82ea36ef67771b88af71b7be84a678b3..9afeba9ec1f4b2ab6bfe1c58a056c03ce695b5ad 100644 (file)
@@ -340,7 +340,7 @@ MemBuf::vPrintf(const char *fmt, va_list vargs)
     if (!size || buf[size - 1]) {
         assert(!buf[size]);
     } else {
-        size--;
+        --size;
     }
 }
 
index 7652d1b06441a111f4121eff220aa1747e81499a..5a0540345caad5a9ddbecf80fce8d362bf5704e9 100644 (file)
@@ -1982,7 +1982,7 @@ isUnsignedNumeric(const char *str, size_t len)
 {
     if (len < 1) return false;
 
-    for (; len >0 && *str; str++, len--) {
+    for (; len >0 && *str; ++str, --len) {
         if (! isdigit(*str))
             return false;
     }
index 8e2636d989afd0a85b5cf0dc20bfc64449fa6411..181095ed6e104155d64f3dca4639203fd45a65ae 100644 (file)
@@ -201,7 +201,7 @@ cacheIndexScan(CacheIndex * idx, const char *fname, FILE * file)
                 assert(idx->count);
                 hash_remove_link(idx->hash, (hash_link *) olde);
                 cacheEntryDestroy(olde);
-                idx->count--;
+                -- idx->count;
             }
         } else {
             fprintf(stderr, "%s:%d: unknown swap log action\n", fname, count);
index cf119901557cd4927ac7ee64ba562949ab5523f8..ae35aaf8b62e92539c1767e92573a9a02f598909 100644 (file)
@@ -358,7 +358,7 @@ cbdataInternalFree(void *p)
         return NULL;
     }
 
-    cbdataCount--;
+    --cbdataCount;
     debugs(45, 9, "cbdataFree: Freeing " << p);
 #if USE_CBDATA_DEBUG
 
@@ -460,12 +460,12 @@ cbdataInternalUnlock(const void *p)
 
     assert(c->locks > 0);
 
-    c->locks--;
+    -- c->locks;
 
     if (c->valid || c->locks)
         return;
 
-    cbdataCount--;
+    --cbdataCount;
 
     debugs(45, 9, "cbdataUnlock: Freeing " << p);
 
index 3028725c31b46d1a62deae4ed47890a60cfc273b..79b1051cec05ca7abc30a945f84024749bd5ee1c 100644 (file)
@@ -1923,7 +1923,7 @@ findTrailingHTTPVersion(const char *uriAndHTTPVersion, const char *end)
         assert(end);
     }
 
-    for (; end > uriAndHTTPVersion; end--) {
+    for (; end > uriAndHTTPVersion; --end) {
         if (*end == '\n' || *end == '\r')
             continue;
 
@@ -2713,7 +2713,7 @@ connStripBufferWhitespace (ConnStateData * conn)
 {
     while (conn->in.notYetUsed > 0 && xisspace(conn->in.buf[0])) {
         memmove(conn->in.buf, conn->in.buf + 1, conn->in.notYetUsed - 1);
-        --conn->in.notYetUsed;
+        -- conn->in.notYetUsed;
     }
 }
 
index c571336ac05713f65ecf62c8f0ff5b4470d8153c..ec9afee1b1db5d6081fdfcb6acb44d6c2738ca3c 100644 (file)
@@ -479,11 +479,11 @@ clientFollowXForwardedForCheck(allow_t answer, void *data)
         */
         /* skip trailing space and commas */
         while (l > 0 && (p[l-1] == ',' || xisspace(p[l-1])))
-            l--;
+            --l;
         request->x_forwarded_for_iterator.cut(l);
         /* look for start of last item in list */
         while (l > 0 && ! (p[l-1] == ',' || xisspace(p[l-1])))
-            l--;
+            --l;
         asciiaddr = p+l;
         if ((addr = asciiaddr)) {
             request->indirect_client_addr = addr;
index 8dadfad052744a87b0a78ef6bd5bc3a52b2b6fac..64ab0ba925967a45d16c28ccdf38245c88eedb25 100644 (file)
@@ -484,7 +484,7 @@ _db_rotate_log(void)
      */
     /* Rotate numbers 0 through N up one */
     for (int i = Debug::rotateNumber; i > 1;) {
-        i--;
+        --i;
         snprintf(from, MAXPATHLEN, "%s.%d", debug_log_file, i - 1);
         snprintf(to, MAXPATHLEN, "%s.%d", debug_log_file, i);
 #if _SQUID_MSWIN_
@@ -718,7 +718,7 @@ ctx_print(void)
     }
 
     /* unlock */
-    Ctx_Lock--;
+    --Ctx_Lock;
 }
 
 /* checks for nulls and overflows */
index 4e360fb006f14335cc1e9c6a41789374bc6f3750..3b7149f742855792e0f49a377f98a2ab9da42b9b 100644 (file)
@@ -1150,7 +1150,7 @@ idnsGrokReply(const char *buf, size_t sz, int from_ns)
 
         if (!q->need_vc) {
             q->need_vc = 1;
-            q->nsends--;
+            -- q->nsends;
             idnsSendQuery(q);
         } else {
             // Strange: A TCP DNS response with the truncation bit (TC) set.
@@ -1263,7 +1263,8 @@ idnsRead(int fd, void *data)
      */
     Ip::Address bugbypass;
 
-    while (max--) {
+    while (max) {
+        --max;
         len = comm_udp_recvfrom(fd, rbuf, SQUID_UDP_SO_RCVBUF, 0, bugbypass);
 
         from = bugbypass; // BUG BYPASS. see notes above.
index c4de301087f3559e9a7bdcc9b1d3d339a7b43e91..0339299abaabe48f169786ecd010a6905632e729 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -97,7 +97,7 @@ fdUpdateBiggest(int fd, int opening)
     assert(!opening);
 
     while (Biggest_FD >= 0 && !fd_table[Biggest_FD].flags.open)
-        Biggest_FD--;
+        --Biggest_FD;
 }
 
 void
@@ -118,7 +118,7 @@ fd_close(int fd)
     Comm::SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
     F->flags.open = 0;
     fdUpdateBiggest(fd, 0);
-    Number_FD--;
+    --Number_FD;
     *F = fde();
 }
 
index db120f2a28486816319d60632daf5745d22de6b3..13f144d2b8e6fcef94079a6afd01b10de568a63f 100644 (file)
@@ -107,7 +107,7 @@ FileMap::clearBit(sfileno file_number)
 {
     unsigned long bitmask = (1L << (file_number & LONG_BIT_MASK));
     bitmap[file_number >> LONG_BIT_SHIFT] &= ~bitmask;
-    usedSlots_--;
+    --usedSlots_;
 }
 
 bool
index 21bcbd9f3b448ea38ff182dc031ae5717a4bf065..e17ae7ae19477b5aad87a7e39f8bdb936b2773ac 100644 (file)
@@ -775,7 +775,7 @@ static void
 fqdncacheUnlockEntry(fqdncache_entry * f)
 {
     assert(f->locks > 0);
-    f->locks--;
+    -- f->locks;
 
     if (fqdncacheExpiredEntry(f))
         fqdncacheRelease(f);
index e7b5595fe5416bacadc5600cec75cfd03a2f4377..75f89276f144873c24179af1e4a911e55f357545 100644 (file)
@@ -1124,7 +1124,7 @@ FtpStateData::parseListing()
     end = sbuf + len - 1;
 
     while (*end != '\r' && *end != '\n' && end > sbuf)
-        end--;
+        --end;
 
     usable = end - sbuf;
 
@@ -1652,7 +1652,7 @@ FtpStateData::ftpParseControlReply(char *buf, size_t len, int *codep, size_t *us
     end = sbuf + len - 1;
 
     while (*end != '\r' && *end != '\n' && end > sbuf)
-        end--;
+        --end;
 
     usable = end - sbuf;
 
index 5b4889738490b5c85ca8147d52f13d28b7c4aa1a..7ff7b6ebe1139920987e2fccd2e16968ff6633fc 100644 (file)
@@ -599,7 +599,7 @@ helperShutdown(helper * hlp)
         }
 
         assert(hlp->childs.n_active > 0);
-        hlp->childs.n_active--;
+        -- hlp->childs.n_active;
         srv->flags.shutdown = 1;       /* request it to shut itself down */
 
         if (srv->flags.closing) {
@@ -636,7 +636,7 @@ helperStatefulShutdown(statefulhelper * hlp)
         }
 
         assert(hlp->childs.n_active > 0);
-        hlp->childs.n_active--;
+        -- hlp->childs.n_active;
         srv->flags.shutdown = 1;       /* request it to shut itself down */
 
         if (srv->flags.busy) {
@@ -709,11 +709,11 @@ helperServerFree(helper_server *srv)
     dlinkDelete(&srv->link, &hlp->servers);
 
     assert(hlp->childs.n_running > 0);
-    hlp->childs.n_running--;
+    -- hlp->childs.n_running;
 
     if (!srv->flags.shutdown) {
         assert(hlp->childs.n_active > 0);
-        hlp->childs.n_active--;
+        -- hlp->childs.n_active;
         debugs(84, DBG_CRITICAL, "WARNING: " << hlp->id_name << " #" << srv->index + 1 << " exited");
 
         if (hlp->childs.needNew() > 0) {
@@ -770,11 +770,11 @@ helperStatefulServerFree(helper_stateful_server *srv)
     dlinkDelete(&srv->link, &hlp->servers);
 
     assert(hlp->childs.n_running > 0);
-    hlp->childs.n_running--;
+    -- hlp->childs.n_running;
 
     if (!srv->flags.shutdown) {
         assert( hlp->childs.n_active > 0);
-        hlp->childs.n_active--;
+        -- hlp->childs.n_active;
         debugs(84, 0, "WARNING: " << hlp->id_name << " #" << srv->index + 1 << " exited");
 
         if (hlp->childs.needNew() > 0) {
@@ -822,7 +822,7 @@ static void helperReturnBuffer(int request_number, helper_server * srv, helper *
         if (cbdataReferenceValidDone(r->data, &cbdata))
             callback(cbdata, msg);
 
-        srv->stats.pending--;
+        -- srv->stats.pending;
 
         ++ hlp->stats.replies;
 
@@ -1116,7 +1116,7 @@ Dequeue(helper * hlp)
         r = (helper_request *)link->data;
         dlinkDelete(link, &hlp->queue);
         memFree(link, MEM_DLINK_NODE);
-        hlp->stats.queue_size--;
+        -- hlp->stats.queue_size;
     }
 
     return r;
@@ -1132,7 +1132,7 @@ StatefulDequeue(statefulhelper * hlp)
         r = (helper_stateful_request *)link->data;
         dlinkDelete(link, &hlp->queue);
         memFree(link, MEM_DLINK_NODE);
-        hlp->stats.queue_size--;
+        -- hlp->stats.queue_size;
     }
 
     return r;
index 81f11fca737aad007aa1f8747d07122c7bae1ff9..593c0e679f10833a0c04cced014fab94bb029fdf 100644 (file)
@@ -598,7 +598,8 @@ icpHandleUdp(int sock, void *data)
     int max = INCOMING_UDP_MAX;
     Comm::SetSelect(sock, COMM_SELECT_READ, icpHandleUdp, NULL, 0);
 
-    while (max--) {
+    while (max) {
+        --max;
         len = comm_udp_recvfrom(sock,
                                 buf,
                                 SQUID_UDP_SO_RCVBUF - 1,
index 1efdeffc4b64491615fbae56993835e32ab9544e..9763d7978f1610ed195505eda2151202520f8892 100644 (file)
@@ -90,7 +90,7 @@ Ip::Address::GetCIDR() const
             continue ;  /* A short-cut */
         }
 
-        for (caught = 0 , bit= 7 ; !caught && (bit <= 7); bit--) {
+        for (caught = 0 , bit= 7 ; !caught && (bit <= 7); --bit) {
             caught = ((byte & 0x80) == 0x00);  /* Found a '0' at 'bit' ? */
 
             if (!caught)
@@ -151,7 +151,7 @@ Ip::Address::ApplyMask(const unsigned int cidr, int mtype)
 
     p = (uint8_t*)(&m_SocketAddr.sin6_addr) + 15;
 
-    for (; clearbits>0 && p >= (uint8_t*)&m_SocketAddr.sin6_addr ; p-- ) {
+    for (; clearbits>0 && p >= (uint8_t*)&m_SocketAddr.sin6_addr ; --p ) {
         if (clearbits < 8) {
             *p &= ((0xFF << clearbits) & 0xFF);
             clearbits = 0;
@@ -315,7 +315,7 @@ Ip::Address::GetReverseString6(char buf[MAX_IPSTRLEN], const struct in6_addr &da
 
     /* Compile Err: 'Too many arguments for format. */
 
-    for (int i = 15; i >= 0; i--, p+=4) {
+    for (int i = 15; i >= 0; --i, p+=4) {
         snprintf(p, 5, "%x.%x.", ((r[i])&0xf), (((r[i])>>4)&0xf) );
     }
 
index 777a80aa9d622d43e429b1c3bab8a43cef164ab8..527fdfddc289fdf481d2d813aee6b5b82da23255 100644 (file)
@@ -832,7 +832,7 @@ ipc_thread_2(void *in_params)
             if ((buf2[x - 1] == '\n') && (buf2[x - 2] == '\r')) {
                 buf2[x - 2] = '\n';
                 buf2[x - 1] = '\0';
-                x--;
+                --x;
             }
         }
 
index 2680fd24b20dc2d0753b45127e29327c3449988e..a782c0bbe06b727ce24bb31693747ebca7ff18ba 100644 (file)
@@ -987,7 +987,7 @@ ipcacheUnlockEntry(ipcache_entry * i)
         return;
     }
 
-    i->locks--;
+    -- i->locks;
 
     if (ipcacheExpiredEntry(i))
         ipcacheRelease(i);
@@ -1123,7 +1123,7 @@ ipcacheMarkGoodAddr(const char *name, const Ip::Address &addr)
 
     ia->bad_mask[k] = FALSE;
 
-    ia->badcount--;
+    -- ia->badcount;
 
     debugs(14, 2, "ipcacheMarkGoodAddr: " << name << " " << addr );
 }
index 7c0321d87c52c7b2a0170428b7461d42a0d7791a..770f25ae2f7384d5390b80912c65ab93383f0d3b 100644 (file)
@@ -98,7 +98,7 @@ logfileFreeBuffer(Logfile * lf, logfile_buffer_t * b)
     l_daemon_t *ll = (l_daemon_t *) lf->data;
     assert(b != NULL);
     dlinkDelete(&b->node, &ll->bufs);
-    ll->nbufs--;
+    -- ll->nbufs;
     xfree(b->buf);
     xfree(b);
 }
index efd7a4b061f4837c3e6226c4584b535410580b04..879ae53f6434b6ab90a74638fe975c1601973cac 100644 (file)
@@ -140,7 +140,7 @@ logfile_mod_stdio_rotate(Logfile * lf)
 
     /* Rotate numbers 0 through N up one */
     for (i = Config.Log.rotateNumber; i > 1;) {
-        i--;
+        --i;
         snprintf(from, MAXPATHLEN, "%s.%d", realpath, i - 1);
         snprintf(to, MAXPATHLEN, "%s.%d", realpath, i);
         xrename(from, to);
index 6033226fe9cff7aa87f4641aa05e90b769834777..963780fd4abf801f47fa819176b56b23eb94b78a 100644 (file)
@@ -505,7 +505,7 @@ mcast_encode(unsigned int *ibuf, size_t isize, const unsigned int *key)
         z = htonl(ibuf[i + 1]);
         sum = 0;
 
-        for (n = 32; n; n--) {
+        for (n = 32; n; --n) {
             sum += delta;
             y += (z << 4) + (k0 ^ z) + (sum ^ (z >> 5)) + k1;
             z += (y << 4) + (k2 ^ y) + (sum ^ (y >> 5)) + k3;
index b50470dcaabd48a40a94349a9bf9200d639be7be..cd98407319bdd21f73429ebee8b91c98b1c02b98 100644 (file)
@@ -507,7 +507,7 @@ neighborRemove(peer * target)
     if (p) {
         *P = p->next;
         cbdataFree(p);
-        Config.npeers--;
+        --Config.npeers;
     }
 
     first_ping = Config.peers;
@@ -1267,7 +1267,7 @@ peerConnectFailedSilent(peer * p)
         return;
     }
 
-    p->tcp_up--;
+    -- p->tcp_up;
 
     if (!p->tcp_up) {
         debugs(15, 1, "Detected DEAD " << neighborTypeStr(p) << ": " << p->name);
@@ -1341,7 +1341,7 @@ peerProbeConnectDone(const Comm::ConnectionPointer &conn, comm_err_t status, int
         peerConnectFailedSilent(p);
     }
 
-    p->testing_now--;
+    -- p->testing_now;
     conn->close();
     // TODO: log this traffic.
 }
index fc68f2644e7dbb634ae3a82606c787a64069f6a3..326d118d3d299568603e6a6b87e566a8d3a443f1 100644 (file)
@@ -216,7 +216,7 @@ IdleConnList::isAvailable(int i) const
 Comm::ConnectionPointer
 IdleConnList::pop()
 {
-    for (int i=size_-1; i>=0; i--) {
+    for (int i=size_-1; i>=0; --i) {
 
         if (!isAvailable(i))
             continue;
@@ -254,7 +254,7 @@ IdleConnList::findUseable(const Comm::ConnectionPointer &key)
     const bool keyCheckAddr = !key->local.IsAnyAddr();
     const bool keyCheckPort = key->local.GetPort() > 0;
 
-    for (int i=size_-1; i>=0; i--) {
+    for (int i=size_-1; i>=0; --i) {
 
         if (!isAvailable(i))
             continue;
index 230562a18455c95bc4eaad130b1320af12c3f3bc..86f7b3010f075b5bb421dec4aea8d3c5afc28555 100644 (file)
@@ -654,7 +654,7 @@ snmpTreeNext(oid * Current, snint CurrentLen, oid ** Next, snint * NextLen)
     }
 
     if ((mibTreeEntry) && (mibTreeEntry->parsefunction)) {
-        count--;
+        --count;
         nextoid = snmpTreeSiblingEntry(Current[count], count, mibTreeEntry->parent);
         if (nextoid) {
             debugs(49, 5, "snmpTreeNext: Next OID found for sibling" << nextoid );
@@ -664,7 +664,7 @@ snmpTreeNext(oid * Current, snint CurrentLen, oid ** Next, snint * NextLen)
             debugs(49, 5, "snmpTreeNext: Attempting to recurse up for next object");
 
             while (!nextoid) {
-                count--;
+                --count;
 
                 if (mibTreeEntry->parent->parent) {
                     nextoid = mibTreeEntry->parent;
index 353a4536c2298453dd15354e209fabf223fcf849..c3dd114a81b98d57d155717f11f5c5f096bbfac1 100644 (file)
@@ -90,7 +90,7 @@ void Ssl::LocalContextStorage::remove(char const * host_name)
 void Ssl::LocalContextStorage::purgeOne()
 {
     QueueIterator i = lru_queue.end();
-    i--;
+    --i;
     if (i != lru_queue.end()) {
         remove((*i)->host_name.c_str());
     }
index f804f00eb0b253511f1b050eac32889005a08bbe..0891656f10a7f5d2d883180dd01427c0a2558b87 100644 (file)
@@ -67,8 +67,7 @@ ssl_ask_password_cb(char *buf, int size, int rwflag, void *userdata)
         len = strlen(buf);
 
     while (len > 0 && (buf[len - 1] == '\n' || buf[len - 1] == '\r'))
-
-        len--;
+        --len;
 
     buf[len] = '\0';
 
index ebe80431fc4537f323c680d278f7ab154d4e3dd7..b05a2ebd847d9120598eac2e81aae39f393c9fd0 100644 (file)
@@ -555,7 +555,7 @@ StoreEntry::releaseRequest()
 int
 StoreEntry::unlock()
 {
-    lock_count--;
+    --lock_count;
     debugs(20, 3, "StoreEntry::unlock: key '" << getMD5Text() << "' count=" << lock_count);
 
     if (lock_count)
@@ -1653,7 +1653,7 @@ StoreEntry::setMemStatus(mem_status_t new_status)
             debugs(20, 4, "StoreEntry::setMemStatus: removed mem node " << mem_obj->url);
         }
 
-        hot_obj_count--;
+        --hot_obj_count;
     }
 
     mem_status = new_status;
index 5cc494b0df1f30db0fc4e68d5095422757506e69..5275dafea620562bfe6ec0de16c356309fbb637e 100644 (file)
@@ -701,7 +701,7 @@ storeUnregister(store_client * sc, StoreEntry * e, void *data)
     }
 
     dlinkDelete(&sc->node, &mem->clients);
-    mem->nclients--;
+    -- mem->nclients;
 
     if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE)
         e->swapOut();
index 433b85e3e99262f356fc96394cbe0b5ee8c6513b..509f5ae71bc93488208e851f433ad4d6bb61b9f4 100644 (file)
@@ -109,7 +109,7 @@ storeCleanup(void *datanotused)
         debugs(20, 1, "  Completed Validation Procedure");
         debugs(20, 1, "  Validated " << validated << " Entries");
         debugs(20, 1, "  store_swap_size = " << Store::Root().currentSize() / 1024.0 << " KB");
-        StoreController::store_dirs_rebuilding--;
+        --StoreController::store_dirs_rebuilding;
         assert(0 == StoreController::store_dirs_rebuilding);
 
         if (opt_store_doublecheck)
index 4752e900bf16a414a259a3ed452ce1152ce0d963..a02e53bee2310aad5015d09b513354dee2ba82c9 100644 (file)
@@ -465,7 +465,7 @@ accessLogReader(FileIterator * fi)
     }
 
     while (*url)
-        url--;
+        --url;
 
     ++url;
 
@@ -515,7 +515,7 @@ cachePurge(Cache * cache, storeSwapLogData * s, int update_digest)
 
         cacheEntryDestroy(olde);
 
-        cache->count--;
+        -- cache->count;
     }
 }
 
index da8ada8d8c7f89565ad0645826514141e62cfa62..d60d3028ecf6f6168fe72d6dc29d36a6856d0410 100644 (file)
@@ -110,7 +110,7 @@ unlinkdUnlink(const char *path)
 
             for (i = 0; i < bytes_read; ++i)
                 if ('\n' == rbuf[i])
-                    queuelen--;
+                    --queuelen;
 
             assert(queuelen >= 0);
         }
index 672f2b8ddd7456229fd1158fac0dbe9ac26b843d..338fc628e3fd89d4a65cd5dee8df6df459ebd5b5 100644 (file)
@@ -1831,7 +1831,7 @@ wccp2AssignBuckets(void *voidnotused)
                             int n;
                             unsigned long step;
 
-                            for (n = num_caches; n; n--) {
+                            for (n = num_caches; n; --n) {
                                 ++cache;
 
                                 if (cache >= num_caches)
index bcb72f85521d6e95d2381f4537c845b38d1a6300..020103f3ec727de8487417388205897d408fcd4d 100644 (file)
@@ -935,14 +935,14 @@ main(int argc, char *argv[])
             } else if (argc > 2) {
                 value = args[2];
                 ++args;
-                argc--;
+                --argc;
             } else
                 value = "";
 #endif
             break;
         }
         ++args;
-        argc--;
+        --argc;
     }
 
     req = read_request();
index 46205c59bb763cb56542a68f887c69678a86bda1..f75dceb4e43d326ce6b3fb8f97d7c08876bfa6c0 100644 (file)
@@ -210,7 +210,7 @@ main(int argc, char *argv[])
     int ping, pcount;
     int keep_alive = 0;
     int opt_noaccept = 0;
-    int opt_verbose = 0;
+    bool opt_verbose = false;
 #if HAVE_GSSAPI
     int www_neg = 0, proxy_neg = 0;
 #endif
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
 #endif
             case 'v':
                 /* undocumented: may increase verb-level by giving more -v's */
-                ++opt_verbose;
+                opt_verbose=true;
                 break;
 
             case '?':          /* usage */