From: Francesco Chemolli Date: Fri, 20 Jul 2012 15:31:04 +0000 (+0200) Subject: Changed decrement operators from postfix to prefix form. X-Git-Tag: sourceformat-review-1~164^2~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e263176a4cd0d1dece12c588641fe4ae604bd94;p=thirdparty%2Fsquid.git Changed decrement operators from postfix to prefix form. --- diff --git a/src/ClientDelayConfig.cc b/src/ClientDelayConfig.cc index 79f9d8eb7c..7ad363e9cd 100644 --- a/src/ClientDelayConfig.cc +++ b/src/ClientDelayConfig.cc @@ -66,7 +66,7 @@ void ClientDelayConfig::parsePoolRates() return; } - pool--; + --pool; pools[pool].rate = GetInteger(); pools[pool].highwatermark = GetInteger64(); diff --git a/src/DelayConfig.cc b/src/DelayConfig.cc index f1327911e6..73830f1ac5 100644 --- a/src/DelayConfig.cc +++ b/src/DelayConfig.cc @@ -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"); diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index 72a176806a..19f220b44c 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -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; } } diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index dffc15c297..b27a5d088d 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -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; } } diff --git a/src/DiskIO/Mmapped/MmappedFile.cc b/src/DiskIO/Mmapped/MmappedFile.cc index 52309f1844..2501d73e9e 100644 --- a/src/DiskIO/Mmapped/MmappedFile.cc +++ b/src/DiskIO/Mmapped/MmappedFile.cc @@ -108,7 +108,7 @@ void MmappedFile::doClose() if (fd >= 0) { file_close(fd); fd = -1; - store_open_disk_fd--; + --store_open_disk_fd; } } diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 2db5d00dab..edeb9c640d 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -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 */ diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 3900e28201..c8fc6aa0d3 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -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; diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 6ae172909c..b008db9e0e 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -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'); diff --git a/src/HttpParser.cc b/src/HttpParser.cc index b51f50cc6c..69c926bccf 100644 --- a/src/HttpParser.cc +++ b/src/HttpParser.cc @@ -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 diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index b5656600fd..72be7f9da4 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -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 diff --git a/src/LeakFinder.cc b/src/LeakFinder.cc index 44de684440..4c49e27c41 100644 --- a/src/LeakFinder.cc +++ b/src/LeakFinder.cc @@ -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; diff --git a/src/MemBuf.cc b/src/MemBuf.cc index 13ffdefd82..9afeba9ec1 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -340,7 +340,7 @@ MemBuf::vPrintf(const char *fmt, va_list vargs) if (!size || buf[size - 1]) { assert(!buf[size]); } else { - size--; + --size; } } diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 7652d1b064..5a0540345c 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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; } diff --git a/src/cache_diff.cc b/src/cache_diff.cc index 8e2636d989..181095ed6e 100644 --- a/src/cache_diff.cc +++ b/src/cache_diff.cc @@ -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); diff --git a/src/cbdata.cc b/src/cbdata.cc index cf11990155..ae35aaf8b6 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -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); diff --git a/src/client_side.cc b/src/client_side.cc index 3028725c31..79b1051cec 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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; } } diff --git a/src/client_side_request.cc b/src/client_side_request.cc index c571336ac0..ec9afee1b1 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -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; diff --git a/src/debug.cc b/src/debug.cc index 8dadfad052..64ab0ba925 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -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 */ diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 4e360fb006..3b7149f742 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -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. diff --git a/src/fd.cc b/src/fd.cc index c4de301087..0339299aba 100644 --- 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(); } diff --git a/src/filemap.cc b/src/filemap.cc index db120f2a28..13f144d2b8 100644 --- a/src/filemap.cc +++ b/src/filemap.cc @@ -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 diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 21bcbd9f3b..e17ae7ae19 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -775,7 +775,7 @@ static void fqdncacheUnlockEntry(fqdncache_entry * f) { assert(f->locks > 0); - f->locks--; + -- f->locks; if (fqdncacheExpiredEntry(f)) fqdncacheRelease(f); diff --git a/src/ftp.cc b/src/ftp.cc index e7b5595fe5..75f89276f1 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -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; diff --git a/src/helper.cc b/src/helper.cc index 5b48897384..7ff7b6ebe1 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -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; diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 81f11fca73..593c0e679f 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -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, diff --git a/src/ip/Address.cc b/src/ip/Address.cc index 1efdeffc4b..9763d7978f 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -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) ); } diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index 777a80aa9d..527fdfddc2 100644 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -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; } } diff --git a/src/ipcache.cc b/src/ipcache.cc index 2680fd24b2..a782c0bbe0 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -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 ); } diff --git a/src/log/ModDaemon.cc b/src/log/ModDaemon.cc index 7c0321d87c..770f25ae2f 100644 --- a/src/log/ModDaemon.cc +++ b/src/log/ModDaemon.cc @@ -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); } diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc index efd7a4b061..879ae53f64 100644 --- a/src/log/ModStdio.cc +++ b/src/log/ModStdio.cc @@ -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); diff --git a/src/log/access_log.cc b/src/log/access_log.cc index 6033226fe9..963780fd4a 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -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; diff --git a/src/neighbors.cc b/src/neighbors.cc index b50470dcaa..cd98407319 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -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. } diff --git a/src/pconn.cc b/src/pconn.cc index fc68f2644e..326d118d3d 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -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; diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 230562a184..86f7b3010f 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -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; diff --git a/src/ssl/context_storage.cc b/src/ssl/context_storage.cc index 353a4536c2..c3dd114a81 100644 --- a/src/ssl/context_storage.cc +++ b/src/ssl/context_storage.cc @@ -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()); } diff --git a/src/ssl/support.cc b/src/ssl/support.cc index f804f00eb0..0891656f10 100644 --- a/src/ssl/support.cc +++ b/src/ssl/support.cc @@ -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'; diff --git a/src/store.cc b/src/store.cc index ebe80431fc..b05a2ebd84 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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; diff --git a/src/store_client.cc b/src/store_client.cc index 5cc494b0df..5275dafea6 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -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(); diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 433b85e3e9..509f5ae71b 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -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) diff --git a/src/test_cache_digest.cc b/src/test_cache_digest.cc index 4752e900bf..a02e53bee2 100644 --- a/src/test_cache_digest.cc +++ b/src/test_cache_digest.cc @@ -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; } } diff --git a/src/unlinkd.cc b/src/unlinkd.cc index da8ada8d8c..d60d3028ec 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -110,7 +110,7 @@ unlinkdUnlink(const char *path) for (i = 0; i < bytes_read; ++i) if ('\n' == rbuf[i]) - queuelen--; + --queuelen; assert(queuelen >= 0); } diff --git a/src/wccp2.cc b/src/wccp2.cc index 672f2b8ddd..338fc628e3 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -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) diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index bcb72f8552..020103f3ec 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -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(); diff --git a/tools/squidclient.cc b/tools/squidclient.cc index 46205c59bb..f75dceb4e4 100644 --- a/tools/squidclient.cc +++ b/tools/squidclient.cc @@ -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 */