return;
}
- pool--;
+ --pool;
pools[pool].rate = GetInteger();
pools[pool].highwatermark = GetInteger64();
return;
}
- pool--;
+ --pool;
DelayPools::delay_data[pool].createPool(delay_class_);
}
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");
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;
file_close(fd);
#endif
- store_open_disk_fd--;
+ --store_open_disk_fd;
fd = -1;
}
}
file_close(TheFile);
debugs(79,3, HERE << "rock db closed " << path << ": FD " << TheFile);
TheFile = -1;
- store_open_disk_fd--;
+ --store_open_disk_fd;
}
}
if (fd >= 0) {
file_close(fd);
fd = -1;
- store_open_disk_fd--;
+ --store_open_disk_fd;
}
}
++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;
assert(Headers[id].stat.aliveCount);
- Headers[id].stat.aliveCount--;
+ -- Headers[id].stat.aliveCount;
id = HDR_BAD_HDR;
}
"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;
++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 */
/* rtrim */
while (len > 0 && xisspace((*item)[len - 1]))
- len--;
+ --len;
if (ilen)
*ilen = len;
assert(**blk_end == '\n');
while (*(*blk_end - 1) == '\r')
- (*blk_end)--;
+ --(*blk_end);
assert(*(*blk_end - 1) == '\n');
// 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
end = ver - 1;
while (xisspace(*end)) // find prev non-space
- end--;
+ --end;
++end; // back to space
LeakFinderPtr *c = (LeakFinderPtr *) hash_lookup(table, p);
assert(c);
hash_remove_link(table, c);
- count--;
+ --count;
delete c;
dump();
return p;
if (!size || buf[size - 1]) {
assert(!buf[size]);
} else {
- size--;
+ --size;
}
}
{
if (len < 1) return false;
- for (; len >0 && *str; str++, len--) {
+ for (; len >0 && *str; ++str, --len) {
if (! isdigit(*str))
return false;
}
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);
return NULL;
}
- cbdataCount--;
+ --cbdataCount;
debugs(45, 9, "cbdataFree: Freeing " << p);
#if USE_CBDATA_DEBUG
assert(c->locks > 0);
- c->locks--;
+ -- c->locks;
if (c->valid || c->locks)
return;
- cbdataCount--;
+ --cbdataCount;
debugs(45, 9, "cbdataUnlock: Freeing " << p);
assert(end);
}
- for (; end > uriAndHTTPVersion; end--) {
+ for (; end > uriAndHTTPVersion; --end) {
if (*end == '\n' || *end == '\r')
continue;
{
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;
}
}
*/
/* 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;
*/
/* 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_
}
/* unlock */
- Ctx_Lock--;
+ --Ctx_Lock;
}
/* checks for nulls and overflows */
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.
*/
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.
assert(!opening);
while (Biggest_FD >= 0 && !fd_table[Biggest_FD].flags.open)
- Biggest_FD--;
+ --Biggest_FD;
}
void
Comm::SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
F->flags.open = 0;
fdUpdateBiggest(fd, 0);
- Number_FD--;
+ --Number_FD;
*F = fde();
}
{
unsigned long bitmask = (1L << (file_number & LONG_BIT_MASK));
bitmap[file_number >> LONG_BIT_SHIFT] &= ~bitmask;
- usedSlots_--;
+ --usedSlots_;
}
bool
fqdncacheUnlockEntry(fqdncache_entry * f)
{
assert(f->locks > 0);
- f->locks--;
+ -- f->locks;
if (fqdncacheExpiredEntry(f))
fqdncacheRelease(f);
end = sbuf + len - 1;
while (*end != '\r' && *end != '\n' && end > sbuf)
- end--;
+ --end;
usable = end - sbuf;
end = sbuf + len - 1;
while (*end != '\r' && *end != '\n' && end > sbuf)
- end--;
+ --end;
usable = end - sbuf;
}
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) {
}
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) {
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) {
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) {
if (cbdataReferenceValidDone(r->data, &cbdata))
callback(cbdata, msg);
- srv->stats.pending--;
+ -- srv->stats.pending;
++ hlp->stats.replies;
r = (helper_request *)link->data;
dlinkDelete(link, &hlp->queue);
memFree(link, MEM_DLINK_NODE);
- hlp->stats.queue_size--;
+ -- hlp->stats.queue_size;
}
return r;
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;
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,
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)
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;
/* 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) );
}
if ((buf2[x - 1] == '\n') && (buf2[x - 2] == '\r')) {
buf2[x - 2] = '\n';
buf2[x - 1] = '\0';
- x--;
+ --x;
}
}
return;
}
- i->locks--;
+ -- i->locks;
if (ipcacheExpiredEntry(i))
ipcacheRelease(i);
ia->bad_mask[k] = FALSE;
- ia->badcount--;
+ -- ia->badcount;
debugs(14, 2, "ipcacheMarkGoodAddr: " << name << " " << addr );
}
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);
}
/* 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);
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;
if (p) {
*P = p->next;
cbdataFree(p);
- Config.npeers--;
+ --Config.npeers;
}
first_ping = Config.peers;
return;
}
- p->tcp_up--;
+ -- p->tcp_up;
if (!p->tcp_up) {
debugs(15, 1, "Detected DEAD " << neighborTypeStr(p) << ": " << p->name);
peerConnectFailedSilent(p);
}
- p->testing_now--;
+ -- p->testing_now;
conn->close();
// TODO: log this traffic.
}
Comm::ConnectionPointer
IdleConnList::pop()
{
- for (int i=size_-1; i>=0; i--) {
+ for (int i=size_-1; i>=0; --i) {
if (!isAvailable(i))
continue;
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;
}
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 );
debugs(49, 5, "snmpTreeNext: Attempting to recurse up for next object");
while (!nextoid) {
- count--;
+ --count;
if (mibTreeEntry->parent->parent) {
nextoid = mibTreeEntry->parent;
void Ssl::LocalContextStorage::purgeOne()
{
QueueIterator i = lru_queue.end();
- i--;
+ --i;
if (i != lru_queue.end()) {
remove((*i)->host_name.c_str());
}
len = strlen(buf);
while (len > 0 && (buf[len - 1] == '\n' || buf[len - 1] == '\r'))
-
- len--;
+ --len;
buf[len] = '\0';
int
StoreEntry::unlock()
{
- lock_count--;
+ --lock_count;
debugs(20, 3, "StoreEntry::unlock: key '" << getMD5Text() << "' count=" << lock_count);
if (lock_count)
debugs(20, 4, "StoreEntry::setMemStatus: removed mem node " << mem_obj->url);
}
- hot_obj_count--;
+ --hot_obj_count;
}
mem_status = new_status;
}
dlinkDelete(&sc->node, &mem->clients);
- mem->nclients--;
+ -- mem->nclients;
if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE)
e->swapOut();
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)
}
while (*url)
- url--;
+ --url;
++url;
cacheEntryDestroy(olde);
- cache->count--;
+ -- cache->count;
}
}
for (i = 0; i < bytes_read; ++i)
if ('\n' == rbuf[i])
- queuelen--;
+ --queuelen;
assert(queuelen >= 0);
}
int n;
unsigned long step;
- for (n = num_caches; n; n--) {
+ for (n = num_caches; n; --n) {
++cache;
if (cache >= num_caches)
} else if (argc > 2) {
value = args[2];
++args;
- argc--;
+ --argc;
} else
value = "";
#endif
break;
}
++args;
- argc--;
+ --argc;
}
req = read_request();
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
#endif
case 'v':
/* undocumented: may increase verb-level by giving more -v's */
- ++opt_verbose;
+ opt_verbose=true;
break;
case '?': /* usage */