]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Changed increment/decrement operators from postfix to prefix form.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 12 Jul 2012 09:08:16 +0000 (11:08 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 12 Jul 2012 09:08:16 +0000 (11:08 +0200)
22 files changed:
src/DiskIO/AIO/AIODiskFile.cc
src/DiskIO/AIO/AIODiskIOStrategy.cc
src/DiskIO/AIO/aio_win32.cc
src/DiskIO/Blocking/BlockingFile.cc
src/DiskIO/DiskDaemon/DiskdFile.cc
src/DiskIO/DiskDaemon/DiskdIOStrategy.cc
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
src/DiskIO/DiskThreads/aiops.cc
src/DiskIO/DiskThreads/aiops_win32.cc
src/DiskIO/DiskThreads/async_io.cc
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/Mmapped/MmappedFile.cc
src/esi/Libxml2Parser.cc
src/eui/Eui48.cc
src/format/Format.cc
src/format/Token.cc
src/fs/coss/store_dir_coss.cc
src/fs/coss/store_io_coss.cc
src/fs/rock/RockRebuild.cc
src/fs/ufs/store_dir_ufs.cc
src/fs/ufs/ufscommon.cc

index fafc127ff044a2f18f7eb153d9b007e99a05a350..33abf93dd9df8a8aec5b7779dc72d37fbb930cc7 100644 (file)
@@ -99,7 +99,7 @@ AIODiskFile::open(int flags, mode_t mode, RefCount<IORequestor> callback)
         error(true);
     } else {
         closed = false;
-        store_open_disk_fd++;
+        ++store_open_disk_fd;
         debugs(79, 3, HERE << ": opened FD " << fd);
     }
 
@@ -159,7 +159,7 @@ AIODiskFile::read(ReadRequest *request)
     qe->aq_e_aiocb.aio_buf =  request->buf;
 
     /* Account */
-    strategy->aq.aq_numpending++;
+    ++ strategy->aq.aq_numpending;
 
     /* Initiate aio */
     if (aio_read(&qe->aq_e_aiocb) < 0) {
index 60847b48319cf91d1ac5d7a36927ab540b3eaf76..ef1777093d46b336adb850579dad6e185b2e0da0 100644 (file)
@@ -136,7 +136,7 @@ AIODiskIOStrategy::callback()
 
     /* Loop through all slots */
 
-    for (i = 0; i < MAX_ASYNCOP; i++) {
+    for (i = 0; i < MAX_ASYNCOP; ++i) {
         if (aq.aq_queue[i].aq_e_state == AQ_ENTRY_USED) {
             aqe = &aq.aq_queue[i];
             /* Active, get status */
@@ -223,7 +223,7 @@ AIODiskIOStrategy::findSlot()
 {
     /* Later we should use something a little more .. efficient :) */
 
-    for (int i = 0; i < MAX_ASYNCOP; i++) {
+    for (int i = 0; i < MAX_ASYNCOP; ++i) {
         if (aq.aq_queue[i].aq_e_state == AQ_ENTRY_FREE)
             /* Found! */
             return i;
index 399854f0835b58b0889105a5dd56cdeae302d494..728508dc0c1bbe9fb513f94d5c4847ccf566f90f 100644 (file)
@@ -319,7 +319,7 @@ int aio_open(const char *path, int mode)
                            FILE_FLAG_OVERLAPPED,       /* file attributes         */
                            NULL                                    /* handle to template file */
                           )) != INVALID_HANDLE_VALUE) {
-        statCounter.syscalls.disk.opens++;
+        ++ statCounter.syscalls.disk.opens;
         fd = _open_osfhandle((long) hndl, 0);
         commSetCloseOnExec(fd);
         fd_open(fd, FD_FILE, path);
@@ -336,7 +336,7 @@ void aio_close(int fd)
 {
     CloseHandle((HANDLE)_get_osfhandle(fd));
     fd_close(fd);
-    statCounter.syscalls.disk.closes++;
+    ++ statCounter.syscalls.disk.closes;
 }
 
 
index fd92024a48cc55d9938c436edf0c2bf0abe8bd20..229e977c0d3795b3921bcb57c8453150e0c6fcf3 100644 (file)
@@ -82,7 +82,7 @@ BlockingFile::open(int flags, mode_t mode, RefCount<IORequestor> callback)
         error(true);
     } else {
         closed = false;
-        store_open_disk_fd++;
+        ++store_open_disk_fd;
         debugs(79, 3, "BlockingFile::open: opened FD " << fd);
     }
 
@@ -106,7 +106,7 @@ void BlockingFile::doClose()
     if (fd > -1) {
         closed = true;
         file_close(fd);
-        store_open_disk_fd--;
+        --store_open_disk_fd;
         fd = -1;
     }
 }
index af376dcb8cb5796766eb93351dd046a33fc95e6c..9c56f723ace940ff6125f0815dc61e3a2e7caf3d 100644 (file)
@@ -112,7 +112,7 @@ DiskdFile::open(int flags, mode_t aMode, RefCount< IORequestor > callback)
         ioRequestor = NULL;
     }
 
-    diskd_stats.open.ops++;
+    ++diskd_stats.open.ops;
 }
 
 void
@@ -145,7 +145,7 @@ DiskdFile::create(int flags, mode_t aMode, RefCount< IORequestor > callback)
         return;
     }
 
-    diskd_stats.create.ops++;
+    ++diskd_stats.create.ops;
 }
 
 void
@@ -174,7 +174,7 @@ DiskdFile::read(ReadRequest *aRead)
         return;
     }
 
-    diskd_stats.read.ops++;
+    ++diskd_stats.read.ops;
 }
 
 void
@@ -200,7 +200,7 @@ DiskdFile::close()
         return;
     }
 
-    diskd_stats.close.ops++;
+    ++diskd_stats.close.ops;
 }
 
 bool
@@ -280,10 +280,10 @@ DiskdFile::openDone(diomsg *M)
     debugs(79, 3, "storeDiskdOpenDone: status " << M->status);
 
     if (M->status < 0) {
-        diskd_stats.open.fail++;
+        ++diskd_stats.open.fail;
         errorOccured = true;
     } else {
-        diskd_stats.open.success++;
+        ++diskd_stats.open.success;
     }
 
     ioCompleted();
@@ -297,10 +297,10 @@ DiskdFile::createDone(diomsg *M)
     debugs(79, 3, "storeDiskdCreateDone: status " << M->status);
 
     if (M->status < 0) {
-        diskd_stats.create.fail++;
+        ++diskd_stats.create.fail;
         errorOccured = true;
     } else {
-        diskd_stats.create.success++;
+        ++diskd_stats.create.success;
     }
 
     ioCompleted();
@@ -338,7 +338,7 @@ DiskdFile::write(WriteRequest *aRequest)
         return;
     }
 
-    diskd_stats.write.ops++;
+    ++diskd_stats.write.ops;
 }
 
 void
@@ -360,10 +360,10 @@ DiskdFile::closeDone(diomsg * M)
     debugs(79, 3, "DiskdFile::closeDone: status " << M->status);
 
     if (M->status < 0) {
-        diskd_stats.close.fail++;
+        ++diskd_stats.close.fail;
         errorOccured = true;
     } else {
-        diskd_stats.close.success++;
+        ++diskd_stats.close.success;
     }
 
     ioCompleted();
@@ -385,14 +385,14 @@ DiskdFile::readDone(diomsg * M)
     readRequest->RefCountDereference();
 
     if (M->status < 0) {
-        diskd_stats.read.fail++;
+        ++diskd_stats.read.fail;
         ioCompleted();
         errorOccured = true;
         ioRequestor->readCompleted(NULL, -1, DISK_ERROR, readRequest);
         return;
     }
 
-    diskd_stats.read.success++;
+    ++diskd_stats.read.success;
 
     ioCompleted();
     ioRequestor->readCompleted (IO->shm.buf + M->shm_offset,  M->status, DISK_OK, readRequest);
@@ -410,13 +410,13 @@ DiskdFile::writeDone(diomsg *M)
 
     if (M->status < 0) {
         errorOccured = true;
-        diskd_stats.write.fail++;
+        ++diskd_stats.write.fail;
         ioCompleted();
         ioRequestor->writeCompleted (DISK_ERROR,0, writeRequest);
         return;
     }
 
-    diskd_stats.write.success++;
+    ++diskd_stats.write.success;
     ioCompleted();
     ioRequestor->writeCompleted (DISK_OK,M->status, writeRequest);
 }
index 1c0b937e5bcc25ff7c3e2a6e43fc7dc3820b1ee9..1168bfea9eb5793fad5ba774a6e20acc8b831029 100644 (file)
@@ -87,7 +87,7 @@ DiskdIOStrategy::load()
 void
 DiskdIOStrategy::openFailed()
 {
-    diskd_stats.open_fail_queue_len++;
+    ++diskd_stats.open_fail_queue_len;
 }
 
 DiskFile::Pointer
@@ -151,7 +151,7 @@ DiskdIOStrategy::unlinkFile(char const *path)
         //        shm.put (shm_offset);
     }
 
-    diskd_stats.unlink.ops++;
+    ++diskd_stats.unlink.ops;
 }
 
 void
@@ -238,7 +238,7 @@ SharedMemory::get(ssize_t * shm_offset)
     char *aBuf = NULL;
     int i;
 
-    for (i = 0; i < nbufs; i++) {
+    for (i = 0; i < nbufs; ++i) {
         if (CBIT_TEST(inuse_map, i))
             continue;
 
@@ -254,7 +254,7 @@ SharedMemory::get(ssize_t * shm_offset)
     assert(aBuf);
     assert(aBuf >= buf);
     assert(aBuf < buf + (nbufs * SHMBUF_BLKSZ));
-    diskd_stats.shmbuf_count++;
+    ++diskd_stats.shmbuf_count;
 
     if (diskd_stats.max_shmuse < diskd_stats.shmbuf_count)
         diskd_stats.max_shmuse = diskd_stats.shmbuf_count;
@@ -284,7 +284,7 @@ SharedMemory::init(int ikey, int magic2)
     inuse_map = (char *)xcalloc((nbufs + 7) / 8, 1);
     diskd_stats.shmbuf_count += nbufs;
 
-    for (int i = 0; i < nbufs; i++) {
+    for (int i = 0; i < nbufs; ++i) {
         CBIT_SET(inuse_map, i);
         put (i * SHMBUF_BLKSZ);
     }
@@ -297,9 +297,9 @@ DiskdIOStrategy::unlinkDone(diomsg * M)
     ++statCounter.syscalls.disk.unlinks;
 
     if (M->status < 0)
-        diskd_stats.unlink.fail++;
+        ++diskd_stats.unlink.fail;
     else
-        diskd_stats.unlink.success++;
+        ++diskd_stats.unlink.success;
 }
 
 void
@@ -400,8 +400,8 @@ DiskdIOStrategy::SEND(diomsg *M, int mtype, int id, size_t size, off_t offset, s
     last_seq_no = M->seq_no;
 
     if (0 == x) {
-        diskd_stats.sent_count++;
-        away++;
+        ++diskd_stats.sent_count;
+        ++away;
     } else {
         debugs(79, 1, "storeDiskdSend: msgsnd: " << xstrerror());
         cbdataReferenceDone(M->callback_data);
@@ -549,7 +549,7 @@ DiskdIOStrategy::callback()
     int retval = 0;
 
     if (away >= magic2) {
-        diskd_stats.block_queue_len++;
+        ++diskd_stats.block_queue_len;
         retval = 1;
         /* We might not have anything to do, but our queue
          * is full.. */
@@ -574,7 +574,7 @@ DiskdIOStrategy::callback()
             break;
         }
 
-        diskd_stats.recv_count++;
+        ++diskd_stats.recv_count;
         --away;
         handle(&M);
         retval = 1;            /* Return that we've actually done some work */
index 19cfc6222cce0a0f761bf9d72b2ff889648e621c..72a176806a22cac81e18c2fe7e0cd5a38e1e8e55 100644 (file)
@@ -96,7 +96,7 @@ DiskThreadsDiskFile::open(int flags, mode_t mode, RefCount<IORequestor> callback
     }
 
 #endif
-    Opening_FD++;
+    ++Opening_FD;
 
     ioRequestor = callback;
 
@@ -145,7 +145,7 @@ DiskThreadsDiskFile::create(int flags, mode_t mode, RefCount<IORequestor> callba
     }
 
 #endif
-    Opening_FD++;
+    ++Opening_FD;
 
     ioRequestor = callback;
 
@@ -189,7 +189,7 @@ DiskThreadsDiskFile::openDone(int unused, const char *unused2, int anFD, int err
         debugs(79, 1, "\t" << path_);
         errorOccured = true;
     } else {
-        store_open_disk_fd++;
+        ++store_open_disk_fd;
         commSetCloseOnExec(fd);
         fd_open(fd, FD_FILE, path_);
     }
index e490f392c94bd0ffb251afffc9f8d1ff8476c7f2..296e3f4ca2424798828cb7a04fd73e5a20a472fa 100644 (file)
@@ -94,7 +94,7 @@ DiskThreadsIOStrategy::callback()
     int retval = 0;
 
     assert(initialised);
-    squidaio_counts.check_callback++;
+    ++squidaio_counts.check_callback;
 
     for (;;) {
         if ((resultp = squidaio_poll_done()) == NULL)
index b65c7ba35d876dcac6b84ef27d3c22467105729f..926dc7672520e350c3102d2615e626b7cb9ecb3d 100644 (file)
@@ -313,7 +313,7 @@ squidaio_init(void)
 
     assert(NUMTHREADS);
 
-    for (i = 0; i < NUMTHREADS; i++) {
+    for (i = 0; i < NUMTHREADS; ++i) {
         threadp = (squidaio_thread_t *)squidaio_thread_pool->alloc();
         threadp->status = _THREAD_STARTING;
         threadp->current_req = NULL;
@@ -473,7 +473,7 @@ squidaio_thread_loop(void *ptr)
         done_queue.tailp = &request->next;
         pthread_mutex_unlock(&done_queue.mutex);
         CommIO::NotifyIOCompleted();
-        threadp->requests++;
+        ++ threadp->requests;
     }                          /* while forever */
 
     return NULL;
@@ -1040,7 +1040,7 @@ squidaio_stats(StoreEntry * sentry)
 
     threadp = threads;
 
-    for (i = 0; i < NUMTHREADS; i++) {
+    for (i = 0; i < NUMTHREADS; ++i) {
         storeAppendPrintf(sentry, "%i\t0x%lx\t%ld\n", i + 1, (unsigned long)threadp->thread, threadp->requests);
         threadp = threadp->next;
     }
index 60c007659bcea1ec4fbf9dcd7a97bce00fdc63eb..3b54357adc017c833629faf914e4fec37fb4f271 100644 (file)
@@ -305,7 +305,7 @@ squidaio_init(void)
 
     assert(NUMTHREADS);
 
-    for (i = 0; i < NUMTHREADS; i++) {
+    for (i = 0; i < NUMTHREADS; ++i) {
         threadp = (squidaio_thread_t *)squidaio_thread_pool->alloc();
         threadp->status = _THREAD_STARTING;
         threadp->current_req = NULL;
@@ -364,7 +364,7 @@ squidaio_shutdown(void)
 
     threadp = threads;
 
-    for (i = 0; i < NUMTHREADS; i++) {
+    for (i = 0; i < NUMTHREADS; ++i) {
         threadp->exit = 1;
         hthreads[i] = threadp->thread;
         threadp = threadp->next;
@@ -378,7 +378,7 @@ squidaio_shutdown(void)
 
     WaitForMultipleObjects(NUMTHREADS, hthreads, TRUE, 2000);
 
-    for (i = 0; i < NUMTHREADS; i++) {
+    for (i = 0; i < NUMTHREADS; ++i) {
         CloseHandle(hthreads[i]);
     }
 
@@ -550,7 +550,7 @@ squidaio_thread_loop(LPVOID lpParam)
 
         CommIO::NotifyIOCompleted();
         Sleep(0);
-        threadp->requests++;
+        ++ threadp->requests;
     }                          /* while forever */
 
     CloseHandle(cond);
@@ -1153,7 +1153,7 @@ squidaio_stats(StoreEntry * sentry)
 
     threadp = threads;
 
-    for (i = 0; i < NUMTHREADS; i++) {
+    for (i = 0; i < NUMTHREADS; ++i) {
         storeAppendPrintf(sentry, "%i\t0x%lx\t%ld\n", i + 1, threadp->dwThreadId, threadp->requests);
         threadp = threadp->next;
     }
index f0f56a51ccbd99ec795f112dd4ce358c5d8dd365..c8b3c65bf2df23016f14ce0cfe3d6100e3847148 100644 (file)
@@ -57,7 +57,7 @@ aioOpen(const char *path, int oflag, mode_t mode, AIOCB * callback, void *callba
     squidaio_ctrl_t *ctrlp;
 
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.open_start++;
+    ++squidaio_counts.open_start;
     ctrlp = (squidaio_ctrl_t *)DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->alloc();
     ctrlp->fd = -2;
     ctrlp->done_handler = callback;
@@ -75,7 +75,7 @@ aioClose(int fd)
     squidaio_ctrl_t *ctrlp;
 
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.close_start++;
+    ++squidaio_counts.close_start;
     aioCancel(fd);
     ctrlp = (squidaio_ctrl_t *)DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->alloc();
     ctrlp->fd = fd;
@@ -95,7 +95,7 @@ aioCancel(int fd)
     dlink_node *m, *next;
 
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.cancel++;
+    ++squidaio_counts.cancel;
 
     for (m = used_list.head; m; m = next) {
         next = m->next;
@@ -137,7 +137,7 @@ aioWrite(int fd, off_t offset, char *bufp, size_t len, AIOCB * callback, void *c
     int seekmode;
 
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.write_start++;
+    ++squidaio_counts.write_start;
     ctrlp = (squidaio_ctrl_t *)DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->alloc();
     ctrlp->fd = fd;
     ctrlp->done_handler = callback;
@@ -166,7 +166,7 @@ aioRead(int fd, off_t offset, size_t len, AIOCB * callback, void *callback_data)
     int seekmode;
 
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.read_start++;
+    ++squidaio_counts.read_start;
     ctrlp = (squidaio_ctrl_t *)DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->alloc();
     ctrlp->fd = fd;
     ctrlp->done_handler = callback;
@@ -195,7 +195,7 @@ aioStat(char *path, struct stat *sb, AIOCB * callback, void *callback_data)
     squidaio_ctrl_t *ctrlp;
 
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.stat_start++;
+    ++squidaio_counts.stat_start;
     ctrlp = (squidaio_ctrl_t *)DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->alloc();
     ctrlp->fd = -2;
     ctrlp->done_handler = callback;
@@ -212,7 +212,7 @@ aioUnlink(const char *path, AIOCB * callback, void *callback_data)
 {
     squidaio_ctrl_t *ctrlp;
     assert(DiskThreadsIOStrategy::Instance.initialised);
-    squidaio_counts.unlink_start++;
+    ++squidaio_counts.unlink_start;
     ctrlp = (squidaio_ctrl_t *)DiskThreadsIOStrategy::Instance.squidaio_ctrl_pool->alloc();
     ctrlp->fd = -2;
     ctrlp->done_handler = callback;
index 30f9c585f7da132e9f86e0c727ff21c16dd59c31..dffc15c297179e7b3078cb9c93a5bda27856cd96 100644 (file)
@@ -835,7 +835,7 @@ DiskerOpen(const String &path, int flags, mode_t mode)
         return false;
     }
 
-    store_open_disk_fd++;
+    ++store_open_disk_fd;
     debugs(79,3, HERE << "rock db opened " << path << ": FD " << TheFile);
     return true;
 }
index 0b54105c6b1c49609d2ed41b66b08bf0f6d4ff66..52309f18449bd00b961005fb2d13af00fce2fe27 100644 (file)
@@ -80,7 +80,7 @@ MmappedFile::open(int flags, mode_t mode, RefCount<IORequestor> callback)
         debugs(79,3, HERE << "open error: " << xstrerror());
         error_ = true;
     } else {
-        store_open_disk_fd++;
+        ++store_open_disk_fd;
         debugs(79,3, HERE << "FD " << fd);
 
         // setup mapping boundaries
index 359849a90495147e9935aa733100c7cec64b2127..b5427c297d037bcc3ad8154c923abeda4fd0b2df 100644 (file)
@@ -56,8 +56,8 @@ void esi_startElementSAXFunc(void * ctx, const xmlChar * name, const xmlChar **
     xmlChar **tmp = (xmlChar **)atts;
 
     while (tmp && *tmp != NULL) {
-        count++;
-        tmp++;
+        ++count;
+        ++tmp;
     }
 
     // we increased on every key and value
index bbd19646f8b6bb07d0c4bcaaa7d43cb9fa4051ff..91d86d948795b4a156747a556cc4cef2d7101f04 100644 (file)
@@ -485,7 +485,7 @@ Eui::Eui48::lookup(const Ip::Address &c)
     }
 
     /* Find MAC address from net table */
-    for (i = 0 ; i < NetTable->dwNumEntries ; i++) {
+    for (i = 0 ; i < NetTable->dwNumEntries ; ++i) {
         in_addr a;
         a.s_addr = NetTable->table[i].dwAddr;
         if (c == a && (NetTable->table[i].dwType > 2)) {
index 18348e8148a9e7dec893004b8097a479fc8fff00..bb8bed4bd2a4de5e7a20f46fd179a40351c793f6 100644 (file)
@@ -263,30 +263,30 @@ log_quoted_string(const char *str, char *out)
         case '\r':
             *p++ = '\\';
             *p++ = 'r';
-            str++;
+            ++str;
             break;
 
         case '\n':
             *p++ = '\\';
             *p++ = 'n';
-            str++;
+            ++str;
             break;
 
         case '\t':
             *p++ = '\\';
             *p++ = 't';
-            str++;
+            ++str;
             break;
 
         default:
             *p++ = '\\';
             *p++ = *str;
-            str++;
+            ++str;
             break;
         }
     }
 
-    *p++ = '\0';
+    *p = '\0';
 }
 
 void
index 37c665f06b5a9437ec6ba1e439b6d88309f5bb6c..522914328b19d02cb6359c06e7ed657641fd2a98 100644 (file)
@@ -210,7 +210,7 @@ Format::Token::Init()
 char *
 Format::Token::scanForToken(TokenTableEntry const table[], char *cur)
 {
-    for (TokenTableEntry const *lte = table; lte->configTag != NULL; lte++) {
+    for (TokenTableEntry const *lte = table; lte->configTag != NULL; ++lte) {
         debugs(46, 8, HERE << "compare tokens '" << lte->configTag << "' with '" << cur << "'");
         if (strncmp(lte->configTag, cur, strlen(lte->configTag)) == 0) {
             type = lte->tokenType;
@@ -268,8 +268,8 @@ Format::Token::parse(char *def, Quoting *quoting)
                 break;
             }
 
-            cur++;
-            l--;
+            ++cur;
+            --l;
         }
 
         goto done;
@@ -278,29 +278,29 @@ Format::Token::parse(char *def, Quoting *quoting)
     if (!*cur)
         goto done;
 
-    cur++;
+    ++cur;
 
     // select quoting style for his particular token
     switch (*cur) {
 
     case '"':
         quote = LOG_QUOTE_QUOTES;
-        cur++;
+        ++cur;
         break;
 
     case '\'':
         quote = LOG_QUOTE_RAW;
-        cur++;
+        ++cur;
         break;
 
     case '[':
         quote = LOG_QUOTE_MIMEBLOB;
-        cur++;
+        ++cur;
         break;
 
     case '#':
         quote = LOG_QUOTE_URL;
-        cur++;
+        ++cur;
         break;
 
     default:
@@ -310,12 +310,12 @@ Format::Token::parse(char *def, Quoting *quoting)
 
     if (*cur == '-') {
         left = 1;
-        cur++;
+        ++cur;
     }
 
     if (*cur == '0') {
         zero = 1;
-        cur++;
+        ++cur;
     }
 
     if (xisdigit(*cur))
@@ -326,7 +326,7 @@ Format::Token::parse(char *def, Quoting *quoting)
 
     if (*cur == '{') {
         char *cp;
-        cur++;
+        ++cur;
         l = strcspn(cur, "}");
         cp = (char *)xmalloc(l + 1);
         xstrncpy(cp, cur, l + 1);
@@ -334,14 +334,14 @@ Format::Token::parse(char *def, Quoting *quoting)
         cur += l;
 
         if (*cur == '}')
-            cur++;
+            ++cur;
     }
 
     type = LFT_NONE;
 
     // Scan each registered token namespace
     debugs(46, 9, HERE << "check for token in " << TheConfig.tokens.size() << " namespaces.");
-    for (std::list<TokenNamespace>::const_iterator itr = TheConfig.tokens.begin(); itr != TheConfig.tokens.end(); itr++) {
+    for (std::list<TokenNamespace>::const_iterator itr = TheConfig.tokens.begin(); itr != TheConfig.tokens.end(); ++itr) {
         debugs(46, 7, HERE << "check for possible " << itr->prefix << ":: token");
         const size_t len = itr->prefix.size();
         if (itr->prefix.cmp(cur, len) == 0 && cur[len] == ':' && cur[len+1] == ':') {
@@ -386,7 +386,7 @@ Format::Token::parse(char *def, Quoting *quoting)
 
     if (*cur == ' ') {
         space = 1;
-        cur++;
+        ++cur;
     }
 
 done:
@@ -499,7 +499,7 @@ done:
             int i;
             divisor = 1000000;
 
-            for (i = widthMax; i > 1; i--)
+            for (i = widthMax; i > 1; --i)
                 divisor /= 10;
 
             if (!divisor)
index e0a02f8b668af060e71a658dbf2cd77146de59fd..1e51d449acb8624c9072bf67379d2a4511be6428 100644 (file)
@@ -96,7 +96,7 @@ storeCossDirSwapLogFile(SwapDir * sd, const char *ext)
         while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.')
             pathtmp[strlen(pathtmp) - 1] = '\0';
 
-        for (pathtmp2 = pathtmp; *pathtmp2 == '.'; pathtmp2++);
+        for (pathtmp2 = pathtmp; *pathtmp2 == '.'; ++pathtmp2);
         snprintf(path, MAXPATHLEN - 64, Config.Log.swap, pathtmp2);
 
         if (strncmp(path, Config.Log.swap, MAXPATHLEN - 64) == 0) {
@@ -174,7 +174,7 @@ CossSwapDir::readCompleted(const char *buf, int len, int errflag, RefCount<ReadR
     cstate->flags.reading = 0;
 
     if (errflag) {
-        StoreFScoss::GetInstance().stats.read.fail++;
+        ++ StoreFScoss::GetInstance().stats.read.fail;
 
         if (errflag > 0) {
             errno = errflag;
@@ -185,7 +185,7 @@ CossSwapDir::readCompleted(const char *buf, int len, int errflag, RefCount<ReadR
 
         rlen = -1;
     } else {
-        StoreFScoss::GetInstance().stats.read.success++;
+        ++ StoreFScoss::GetInstance().stats.read.success;
 
         if (cstate->readbuffer == NULL) {
             cstate->readbuffer = (char *)xmalloc(cstate->st_size);
@@ -217,17 +217,17 @@ CossSwapDir::writeCompleted(int errflag, size_t len, RefCount<WriteRequest> writ
 
 
     if (errflag) {
-        StoreFScoss::GetInstance().stats.stripe_write.fail++;
+        ++ StoreFScoss::GetInstance().stats.stripe_write.fail;
         debugs(79, 1, "storeCossWriteMemBufDone: got failure (" << errflag << ")");
         debugs(79, 1, "size=" << cossWrite->membuf->diskend - cossWrite->membuf->diskstart);
     } else {
-        StoreFScoss::GetInstance().stats.stripe_write.success++;
+        ++ StoreFScoss::GetInstance().stats.stripe_write.success;
     }
 
 
     dlinkDelete(&cossWrite->membuf->node, &membufs);
     cbdataFree(cossWrite->membuf);
-    StoreFScoss::GetInstance().stats.stripes--;
+    -- StoreFScoss::GetInstance().stats.stripes;
 }
 
 void
@@ -368,7 +368,7 @@ storeCossRebuildComplete(void *data)
     RebuildState *rb = (RebuildState *)data;
     CossSwapDir *sd = rb->sd;
     sd->startMembuf();
-    StoreController::store_dirs_rebuilding--;
+    -- StoreController::store_dirs_rebuilding;
     storeCossDirCloseTmpSwapLog(rb->sd);
     storeRebuildComplete(&rb->counts);
     cbdataFree(rb);
@@ -385,7 +385,7 @@ storeCossRebuildFromSwapLog(void *data)
     assert(rb != NULL);
     /* load a number of objects per invocation */
 
-    for (int aCount = 0; aCount < rb->speed; aCount++) {
+    for (int aCount = 0; aCount < rb->speed; ++aCount) {
         if (fread(&s, ss, 1, rb->log) != 1) {
             debugs(47, 1, "Done reading " << rb->sd->path << " swaplog (" << rb->n_read << " entries)");
             fclose(rb->log);
@@ -394,7 +394,7 @@ storeCossRebuildFromSwapLog(void *data)
             return;
         }
 
-        rb->n_read++;
+        ++ rb->n_read;
 
         if (s.op <= SWAP_LOG_NOP)
             continue;
@@ -430,8 +430,8 @@ storeCossRebuildFromSwapLog(void *data)
                 e->release();
                 /* Fake an unlink here, this is a bad hack :( */
                 storeCossRemove(rb->sd, e);
-                rb->counts.objcount--;
-                rb->counts.cancelcount++;
+                -- rb->counts.objcount;
+                ++ rb->counts.cancelcount;
             }
             continue;
         } else {
@@ -441,7 +441,7 @@ storeCossRebuildFromSwapLog(void *data)
                     (int) x)
                 debugs(47, 1, "WARNING: " << rb->counts.bad_log_op << " invalid swap log entries found");
 
-            rb->counts.invalid++;
+            ++ rb->counts.invalid;
 
             continue;
         }
@@ -456,7 +456,7 @@ storeCossRebuildFromSwapLog(void *data)
         }
 
         if (EBIT_TEST(s.flags, KEY_PRIVATE)) {
-            rb->counts.badflags++;
+            ++ rb->counts.badflags;
             continue;
         }
 
@@ -466,11 +466,11 @@ storeCossRebuildFromSwapLog(void *data)
         if (e) {
             /* key already exists, current entry is newer */
             /* keep old, ignore new */
-            rb->counts.dupcount++;
+            ++ rb->counts.dupcount;
             continue;
         }
 
-        rb->counts.objcount++;
+        ++ rb->counts.objcount;
 
         e = rb->sd->addDiskRestore(s.key,
                                    s.swap_filen,
@@ -557,7 +557,7 @@ storeCossDirRebuild(CossSwapDir * sd)
     fp = storeCossDirOpenTmpSwapLog(sd, &clean, &zero);
     debugs(47, 1, "Rebuilding COSS storage in " << sd->path << " (" << (clean ? "CLEAN" : "DIRTY") << ")");
     rb->log = fp;
-    StoreController::store_dirs_rebuilding++;
+    ++ StoreController::store_dirs_rebuilding;
 
     if (!clean || fp == NULL) {
         /* COSS cannot yet rebuild from a dirty state. If the log
@@ -941,7 +941,7 @@ CossSwapDir::~CossSwapDir()
 
     closeLog();
 
-    n_coss_dirs--;
+    --n_coss_dirs;
 
     safe_free(ioModule);
 
@@ -1106,7 +1106,7 @@ CossSwapDir::optionBlockSizeParse(const char *option, const char *value, int rec
     int check = blksz;
 
     while (check > 1) {
-        nbits++;
+        ++nbits;
         check >>= 1;
     }
 
index c19642469fdf690df9192c802cb3b5ebec730f9b..458f55d69ac497187345b1d8df40e51175ceb947 100644 (file)
@@ -71,10 +71,10 @@ CossSwapDir::allocate(const StoreEntry * e, int which)
 
     if (which == COSS_ALLOC_REALLOC) {
         checkf = e->swap_filen;
-        StoreFScoss::GetInstance().stats.alloc.realloc++;
+        ++ StoreFScoss::GetInstance().stats.alloc.realloc;
     } else {
         checkf = -1;
-        StoreFScoss::GetInstance().stats.alloc.alloc++;
+        ++ StoreFScoss::GetInstance().stats.alloc.alloc;
     }
 
     if (e->swap_file_sz > 0)
@@ -88,7 +88,7 @@ CossSwapDir::allocate(const StoreEntry * e, int which)
          * tried to allocate past the end of the disk, so wrap
          * back to the beginning
          */
-        StoreFScoss::GetInstance().stats.disk_overflows++;
+        ++ StoreFScoss::GetInstance().stats.disk_overflows;
         current_membuf->flags.full = 1;
         current_membuf->diskend = current_offset;
         current_membuf->maybeWrite(this);
@@ -103,7 +103,7 @@ CossSwapDir::allocate(const StoreEntry * e, int which)
         /*
          * Skip the blank space at the end of the stripe. start over.
          */
-        StoreFScoss::GetInstance().stats.stripe_overflows++;
+        ++ StoreFScoss::GetInstance().stats.stripe_overflows;
         current_membuf->flags.full = 1;
         current_offset = current_membuf->diskend;
         current_membuf->maybeWrite(this);
@@ -123,7 +123,7 @@ CossSwapDir::allocate(const StoreEntry * e, int which)
         current_offset = ((current_offset + blksz_mask) >> blksz_bits ) << blksz_bits;
         return storeCossDiskOffsetToFileno(retofs);
     } else {
-        StoreFScoss::GetInstance().stats.alloc.collisions++;
+        ++ StoreFScoss::GetInstance().stats.alloc.collisions;
         debugs(79, 3, "CossSwapDir::allocate: Collision");
         return -1;
     }
@@ -144,8 +144,8 @@ CossSwapDir::unlink(StoreEntry & e)
         cur_size -= fs.blksize * sizeInBlocks(e.swap_file_sz);
         --n_disk_objects;
     }
-    StoreFScoss::GetInstance().stats.unlink.ops++;
-    StoreFScoss::GetInstance().stats.unlink.success++;
+    ++ StoreFScoss::GetInstance().stats.unlink.ops;
+    ++ StoreFScoss::GetInstance().stats.unlink.success;
     storeCossRemove(this, &e);
 }
 
@@ -163,7 +163,7 @@ CossSwapDir::createStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback,
      * the squid code is broken
      */
     assert(e.mem_obj->object_sz != -1);
-    StoreFScoss::GetInstance().stats.create.ops++;
+    ++ StoreFScoss::GetInstance().stats.create.ops;
 
     /*
      * this one is kinda strange - Eric called allocate(), then
@@ -194,7 +194,7 @@ CossSwapDir::createStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback,
     storeCossAdd(this, &e);
 
     cstate->lockMemBuf();
-    StoreFScoss::GetInstance().stats.create.success++;
+    ++ StoreFScoss::GetInstance().stats.create.success;
     return sio;
 }
 
@@ -207,7 +207,7 @@ CossSwapDir::openStoreIO(StoreEntry & e, StoreIOState::STFNCB * file_callback,
     sfileno f = e.swap_filen;
 
     debugs(79, 3, "storeCossOpen: offset " << f);
-    StoreFScoss::GetInstance().stats.open.ops++;
+    ++ StoreFScoss::GetInstance().stats.open.ops;
 
     StoreIOState::Pointer sio = new CossState (this);
     cstate = dynamic_cast<CossState *>(sio.getRaw());
@@ -232,14 +232,14 @@ CossSwapDir::openStoreIO(StoreEntry & e, StoreIOState::STFNCB * file_callback,
     if (p) {
         cstate->readbuffer = (char *)xmalloc(cstate->st_size);
         memcpy(cstate->readbuffer, p, cstate->st_size);
-        StoreFScoss::GetInstance().stats.open_mem_hits++;
+        ++ StoreFScoss::GetInstance().stats.open_mem_hits;
     } else {
         /* Do the allocation */
         /* this is the first time we've been called on a new sio
          * read the whole object into memory, then return the
          * requested amount
          */
-        StoreFScoss::GetInstance().stats.open_mem_misses++;
+        ++ StoreFScoss::GetInstance().stats.open_mem_misses;
         /*
          * This bit of code actually does the LRU disk thing - we realloc
          * a place for the object here, and the file_read() reads the object
@@ -251,8 +251,8 @@ CossSwapDir::openStoreIO(StoreEntry & e, StoreIOState::STFNCB * file_callback,
 
         if (sio->swap_filen == -1) {
             /* We have to clean up neatly .. */
-            StoreFScoss::GetInstance().stats.open.fail++;
-            numcollisions++;
+            ++ StoreFScoss::GetInstance().stats.open.fail;
+            ++numcollisions;
             debugs(79, 2, "storeCossOpen: Reallocation of " << e.swap_dirn << "/" << e.swap_filen << " failed");
             /* XXX XXX XXX Will squid call storeUnlink for this object? */
             return NULL;
@@ -281,7 +281,7 @@ CossSwapDir::openStoreIO(StoreEntry & e, StoreIOState::STFNCB * file_callback,
                 */
     }
 
-    StoreFScoss::GetInstance().stats.open.success++;
+    ++ StoreFScoss::GetInstance().stats.open.success;
     return sio;
 }
 
@@ -291,8 +291,8 @@ CossState::close(int)
 {
     debugs(79, 3, "storeCossClose: offset " << swap_filen);
 
-    StoreFScoss::GetInstance().stats.close.ops++;
-    StoreFScoss::GetInstance().stats.close.success++;
+    ++ StoreFScoss::GetInstance().stats.close.ops;
+    ++ StoreFScoss::GetInstance().stats.close.success;
     SD->storeCossMemBufUnlock(this);
     doCallback(0);
 }
@@ -303,7 +303,7 @@ CossState::read_(char *buf, size_t size, off_t offset, STRCB * callback, void *c
     char *p;
     CossSwapDir *SD = (CossSwapDir *)INDEXSD(swap_dirn);
 
-    StoreFScoss::GetInstance().stats.read.ops++;
+    ++ StoreFScoss::GetInstance().stats.read.ops;
     assert(read.callback == NULL);
     assert(read.callback_data == NULL);
     read.callback = callback;
@@ -348,7 +348,7 @@ CossState::write(char const *buf, size_t size, off_t offset, FREE * free_func)
      * the squid code is broken
      */
     assert(e->mem_obj->object_sz != -1);
-    StoreFScoss::GetInstance().stats.write.ops++;
+    ++ StoreFScoss::GetInstance().stats.write.ops;
 
     debugs(79, 3, "storeCossWrite: offset " << offset_ << ", len " << (unsigned long int) size);
     diskoffset = SD->storeCossFilenoToDiskOffset(swap_filen) + offset_;
@@ -361,7 +361,7 @@ CossState::write(char const *buf, size_t size, off_t offset, FREE * free_func)
     if (free_func)
         (free_func) ((char *)buf);
 
-    StoreFScoss::GetInstance().stats.write.success++;
+    ++ StoreFScoss::GetInstance().stats.write.success;
 }
 
 off_t
@@ -484,7 +484,7 @@ CossSwapDir::storeCossMemBufUnlock(StoreIOState::Pointer sio)
 
     debugs(79, 3, "storeCossMemBufUnlock: unlocking " << t << ", lockcount " << t->lockcount);
 
-    t->lockcount--;
+    -- t->lockcount;
 
     cstate->locked_membuf = NULL;
 
@@ -542,7 +542,7 @@ CossMemBuf::maybeWrite(CossSwapDir * SD)
 void
 CossMemBuf::write(CossSwapDir * SD)
 {
-    StoreFScoss::GetInstance().stats.stripe_write.ops++;
+    ++ StoreFScoss::GetInstance().stats.stripe_write.ops;
     debugs(79, 3, "CossMemBuf::write: offset " << diskstart << ", len " << (diskend - diskstart));
     flags.writing = 1;
     /* XXX Remember that diskstart/diskend are block offsets! */
@@ -594,7 +594,7 @@ CossSwapDir::createMemBuf(off_t start, sfileno curfn, int *collision)
 
         if ((o >= (off_t)newmb->diskstart) && (o < (off_t)newmb->diskend)) {
             e->release();
-            numreleased++;
+            ++numreleased;
         } else
             break;
     }
@@ -602,7 +602,7 @@ CossSwapDir::createMemBuf(off_t start, sfileno curfn, int *collision)
     if (numreleased > 0)
         debugs(79, 3, "CossSwapDir::createMemBuf: this allocation released " << numreleased << " storeEntries");
 
-    StoreFScoss::GetInstance().stats.stripes++;
+    ++ StoreFScoss::GetInstance().stats.stripes;
 
     return newmb;
 }
index 94eea98707134372f6280a4b1d3eccbe8b2a14ab..552abb81f27e940456c80835e4dce96e22241f11 100644 (file)
@@ -143,7 +143,7 @@ Rock::Rebuild::doOneEntry()
     if (buf.contentSize() < static_cast<mb_size_t>(sizeof(header))) {
         debugs(47, DBG_IMPORTANT, "WARNING: cache_dir[" << sd->index << "]: " <<
                "Ignoring truncated cache entry meta data at " << dbOffset);
-        counts.invalid++;
+        ++counts.invalid;
         return;
     }
     memcpy(&header, buf.content(), sizeof(header));
@@ -151,7 +151,7 @@ Rock::Rebuild::doOneEntry()
     if (!header.sane()) {
         debugs(47, DBG_IMPORTANT, "WARNING: cache_dir[" << sd->index << "]: " <<
                "Ignoring malformed cache entry meta data at " << dbOffset);
-        counts.invalid++;
+        ++counts.invalid;
         return;
     }
     buf.consume(sizeof(header)); // optimize to avoid memmove()
@@ -161,7 +161,7 @@ Rock::Rebuild::doOneEntry()
     if (!storeRebuildParseEntry(buf, loadedE, key, counts, header.payloadSize)) {
         // skip empty slots
         if (loadedE.swap_filen > 0 || loadedE.swap_file_sz > 0) {
-            counts.invalid++;
+            ++counts.invalid;
             //sd->unlink(filen); leave garbage on disk, it should not hurt
         }
         return;
@@ -171,7 +171,7 @@ Rock::Rebuild::doOneEntry()
     if (!storeRebuildKeepEntry(loadedE, key, counts))
         return;
 
-    counts.objcount++;
+    ++counts.objcount;
     // loadedE->dump(5);
 
     sd->addEntry(filen, header, loadedE);
index 96a0cfa2c25cec78d9ad9cae193994059f63832c..ecb8fac49cf9534333fb02ca424346f37bb9d6b4 100644 (file)
@@ -395,7 +395,7 @@ UFSSwapDir::maintain()
         if (!e)
             break;             /* no more objects */
 
-        removed++;
+        ++removed;
 
         e->release();
     }
@@ -557,7 +557,7 @@ UFSSwapDir::verifyCacheDirs()
     if (!pathIsDirectory(path))
         return true;
 
-    for (int j = 0; j < l1; j++) {
+    for (int j = 0; j < l1; ++j) {
         char const *aPath = swapSubDir(j);
 
         if (!pathIsDirectory(aPath))
@@ -572,7 +572,7 @@ UFSSwapDir::createSwapSubDirs()
 {
     LOCAL_ARRAY(char, name, MAXPATHLEN);
 
-    for (int i = 0; i < l1; i++) {
+    for (int i = 0; i < l1; ++i) {
         snprintf(name, MAXPATHLEN, "%s/%02X", path, i);
 
         int should_exist;
@@ -584,7 +584,7 @@ UFSSwapDir::createSwapSubDirs()
 
         debugs(47, 1, "Making directories in " << name);
 
-        for (int k = 0; k < l2; k++) {
+        for (int k = 0; k < l2; ++k) {
             snprintf(name, MAXPATHLEN, "%s/%02X/%02X", path, i, k);
             createDirectory(name, should_exist);
         }
@@ -609,7 +609,7 @@ UFSSwapDir::logFile(char const *ext) const
         while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.')
             pathtmp[strlen(pathtmp) - 1] = '\0';
 
-        for (pathtmp2 = pathtmp; *pathtmp2 == '.'; pathtmp2++);
+        for (pathtmp2 = pathtmp; *pathtmp2 == '.'; ++pathtmp2);
         snprintf(lpath, MAXPATHLEN - 64, Config.Log.swap, pathtmp2);
 
         if (strncmp(lpath, Config.Log.swap, MAXPATHLEN - 64) == 0) {
@@ -1145,7 +1145,7 @@ UFSSwapDir::DirClean(int swap_index)
     if (k > 10)
         k = 10;
 
-    for (n = 0; n < k; n++) {
+    for (n = 0; n < k; ++n) {
         debugs(36, 3, "storeDirClean: Cleaning file "<< std::setfill('0') << std::hex << std::uppercase << std::setw(8) << files[n]);
         snprintf(p2, MAXPATHLEN + 1, "%s/%08X", p1, files[n]);
         safeunlink(p2, 0);
@@ -1177,7 +1177,7 @@ UFSSwapDir::CleanEvent(void *unused)
          */
         UFSDirToGlobalDirMapping = (int *)xcalloc(NumberOfUFSDirs, sizeof(*UFSDirToGlobalDirMapping));
 
-        for (i = 0, n = 0; i < Config.cacheSwap.n_configured; i++) {
+        for (i = 0, n = 0; i < Config.cacheSwap.n_configured; ++i) {
             /* This is bogus, the controller should just clean each instance once */
             sd = dynamic_cast <SwapDir *>(INDEXSD(i));
 
@@ -1205,7 +1205,7 @@ UFSSwapDir::CleanEvent(void *unused)
     /* if the rebuild is finished, start cleaning directories. */
     if (0 == StoreController::store_dirs_rebuilding) {
         n = DirClean(swap_index);
-        swap_index++;
+        ++swap_index;
     }
 
     eventAdd("storeDirClean", CleanEvent, NULL,
index 266715e7f54ab34d9801b5aaa75a69420a847eb6..b329f96cc67b5d1b818661b90f77562ef3eea34c 100644 (file)
@@ -386,7 +386,7 @@ RebuildState::RebuildStep(void *data)
     if (!rb->isDone())
         eventAdd("storeRebuild", RebuildStep, rb, 0.01, 1);
     else {
-        StoreController::store_dirs_rebuilding--;
+        -- StoreController::store_dirs_rebuilding;
         storeRebuildComplete(&rb->counts);
         delete rb;
     }
@@ -457,12 +457,12 @@ RebuildState::rebuildFromDirectory()
     assert(fd > -1);
     /* lets get file stats here */
 
-    n_read++;
+    ++n_read;
 
     if (fstat(fd, &sb) < 0) {
         debugs(47, 1, "commonUfsDirRebuildFromDirectory: fstat(FD " << fd << "): " << xstrerror());
         file_close(fd);
-        store_open_disk_fd--;
+        --store_open_disk_fd;
         fd = -1;
         return;
     }
@@ -477,7 +477,7 @@ RebuildState::rebuildFromDirectory()
                         (int64_t)sb.st_size);
 
     file_close(fd);
-    store_open_disk_fd--;
+    --store_open_disk_fd;
     fd = -1;
 
     if (!loaded) {
@@ -489,7 +489,7 @@ RebuildState::rebuildFromDirectory()
     if (!storeRebuildKeepEntry(tmpe, key, counts))
         return;
 
-    counts.objcount++;
+    ++counts.objcount;
     // tmpe.dump(5);
     currentEntry(sd->addDiskRestore(key,
                                     filn,
@@ -531,10 +531,10 @@ RebuildState::rebuildFromSwapLog()
         return;
     }
 
-    n_read++;
+    ++n_read;
 
     if (!swapData.sane()) {
-        counts.invalid++;
+        ++counts.invalid;
         return;
     }
 
@@ -586,8 +586,8 @@ RebuildState::rebuildFromSwapLog()
             }
 
             currentEntry()->release();
-            counts.objcount--;
-            counts.cancelcount++;
+            --counts.objcount;
+            ++counts.cancelcount;
         }
         return;
     } else {
@@ -597,7 +597,7 @@ RebuildState::rebuildFromSwapLog()
         if (0.0 == x - (double) (int) x)
             debugs(47, 1, "WARNING: " << counts.bad_log_op << " invalid swap log entries found");
 
-        counts.invalid++;
+        ++counts.invalid;
 
         return;
     }
@@ -605,12 +605,12 @@ RebuildState::rebuildFromSwapLog()
     ++counts.scancount; // XXX: should not this be incremented earlier?
 
     if (!sd->validFileno(swapData.swap_filen, 0)) {
-        counts.invalid++;
+        ++counts.invalid;
         return;
     }
 
     if (EBIT_TEST(swapData.flags, KEY_PRIVATE)) {
-        counts.badflags++;
+        ++counts.badflags;
         return;
     }
 
@@ -634,7 +634,7 @@ RebuildState::rebuildFromSwapLog()
 
     if (used && !disk_entry_newer) {
         /* log entry is old, ignore it */
-        counts.clashcount++;
+        ++counts.clashcount;
         return;
     } else if (used && currentEntry() && currentEntry()->swap_filen == swapData.swap_filen && currentEntry()->swap_dirn == sd->index) {
         /* swapfile taken, same URL, newer, update meta */
@@ -672,12 +672,12 @@ RebuildState::rebuildFromSwapLog()
          * were in a slow rebuild and the the swap file number got taken
          * and the validation procedure hasn't run. */
         assert(flags.need_to_validate);
-        counts.clashcount++;
+        ++counts.clashcount;
         return;
     } else if (currentEntry() && !disk_entry_newer) {
         /* key already exists, current entry is newer */
         /* keep old, ignore new */
-        counts.dupcount++;
+        ++counts.dupcount;
         return;
     } else if (currentEntry()) {
         /* key already exists, this swapfile not being used */
@@ -695,14 +695,14 @@ RebuildState::rebuildFromSwapLog()
         }
 
         currentEntry()->release();
-        counts.dupcount++;
+        ++counts.dupcount;
     } else {
         /* URL doesnt exist, swapfile not in use */
         /* load new */
         (void) 0;
     }
 
-    counts.objcount++;
+    ++counts.objcount;
 
     currentEntry(sd->addDiskRestore(swapData.key,
                                     swapData.swap_filen,
@@ -753,7 +753,7 @@ RebuildState::getNextFile(sfileno * filn_p, int *size)
 
             td = opendir(fullpath);
 
-            dirs_opened++;
+            ++dirs_opened;
 
             if (td == NULL) {
                 debugs(47, 1, "commonUfsDirGetNextFile: opendir: " << fullpath << ": " << xstrerror());
@@ -768,7 +768,7 @@ RebuildState::getNextFile(sfileno * filn_p, int *size)
         }
 
         if (td != NULL && (entry = readdir(td)) != NULL) {
-            in_dir++;
+            ++in_dir;
 
             if (sscanf(entry->d_name, "%x", &fn) != 1) {
                 debugs(47, 3, "commonUfsDirGetNextFile: invalid " << entry->d_name);
@@ -797,7 +797,7 @@ RebuildState::getNextFile(sfileno * filn_p, int *size)
             if (fd < 0)
                 debugs(47, 1, "commonUfsDirGetNextFile: " << fullfilename << ": " << xstrerror());
             else
-                store_open_disk_fd++;
+                ++store_open_disk_fd;
 
             continue;
         }