]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Change increment and decrement operators from postfix to prefix form.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 2 Jul 2012 12:28:10 +0000 (14:28 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 2 Jul 2012 12:28:10 +0000 (14:28 +0200)
22 files changed:
lib/MemPool.cc
lib/MemPoolChunked.cc
lib/MemPoolMalloc.cc
lib/hash.cc
lib/malloc_trace.cc
lib/ntlmauth/ntlmauth.cc
lib/profiler/Profiler.cc
src/acl/Asn.cc
src/acl/DestinationIp.cc
src/acl/Gadgets.cc
src/acl/Ip.cc
src/acl/RegexData.cc
src/adaptation/Config.cc
src/adaptation/ServiceConfig.cc
src/adaptation/icap/ServiceRep.cc
src/auth/User.cc
src/auth/basic/auth_basic.cc
src/auth/digest/auth_digest.cc
src/auth/negotiate/UserRequest.cc
src/auth/ntlm/UserRequest.cc
src/base/TextException.cc
src/snmp_core.cc

index 5b7b35416610a95f8efdb17ce7aef489c47235aa..86b97e7aaac72ea475bd7ec2cbdddf42d7fe1fcd 100644 (file)
@@ -302,7 +302,7 @@ memPoolGetGlobalStats(MemPoolGlobalStats * stats)
     iter = memPoolIterate();
     while ((pool = memPoolIterateNext(iter))) {
         if (pool->getStats(&pp_stats, 1) > 0)
-            pools_inuse++;
+            ++pools_inuse;
     }
     memPoolIterateDone(&iter);
 
index 8068513a7f1322e6db7184ccc6996c9b5361a80c..a8245a4512ea4680ab7c2c26ee65894887c2672e 100644 (file)
@@ -147,7 +147,7 @@ MemChunk::MemChunk(MemPoolChunked *aPool)
     freeList = objCache;
     void **Free = (void **)freeList;
 
-    for (int i = 1; i < pool->chunk_capacity; i++) {
+    for (int i = 1; i < pool->chunk_capacity; ++i) {
         *Free = (void *) ((char *) Free + pool->obj_size);
         void **nextFree = (void **)*Free;
         (void) VALGRIND_MAKE_MEM_NOACCESS(Free, pool->obj_size);
@@ -158,7 +158,7 @@ MemChunk::MemChunk(MemPoolChunked *aPool)
 
     memMeterAdd(pool->getMeter().alloc, pool->chunk_capacity);
     memMeterAdd(pool->getMeter().idle, pool->chunk_capacity);
-    pool->chunkCount++;
+    ++pool->chunkCount;
     lastref = squid_curtime;
     pool->allChunks.insert(this, memCompChunks);
 }
@@ -217,7 +217,7 @@ MemPoolChunked::get()
 {
     void **Free;
 
-    saved_calls++;
+    ++saved_calls;
 
     /* first, try cache */
     if (freeCache) {
@@ -239,7 +239,7 @@ MemPoolChunked::get()
     Free = (void **)chunk->freeList;
     chunk->freeList = *Free;
     *Free = NULL;
-    chunk->inuse_count++;
+    ++chunk->inuse_count;
     chunk->lastref = squid_curtime;
 
     if (chunk->freeList == NULL) {
@@ -480,9 +480,9 @@ MemPoolChunked::getStats(MemPoolStats * stats, int accumulate)
     chunk = Chunks;
     while (chunk) {
         if (chunk->inuse_count == 0)
-            chunks_free++;
+            ++chunks_free;
         else if (chunk->inuse_count < chunk_capacity)
-            chunks_partial++;
+            ++chunks_partial;
         chunk = chunk->next;
     }
 
index 8d9ead1b367a33b57f1098f8f4efca916dbdd627..d6067cd9ac844984b5df1f67f51ddb8266f12bd7 100644 (file)
@@ -57,7 +57,7 @@ MemPoolMalloc::allocate()
     void *obj = freelist.pop();
     if (obj) {
         memMeterDec(meter.idle);
-        saved_calls++;
+        ++saved_calls;
     } else {
         obj = xcalloc(1, obj_size);
         memMeterInc(meter.alloc);
index 08109ed22fcbe20db2f0bd7fbbaefd4470f8020c..c3c8ce029a5db0b4ac5af4248793dd5085c08380 100644 (file)
@@ -71,7 +71,7 @@ hash_string(const void *data, unsigned int size)
     unsigned int j = 0;
     unsigned int i = 0;
     while (*s) {
-        j++;
+        ++j;
         n ^= 271 * (*s++);
     }
     i = n ^ (j * 271);
@@ -169,7 +169,7 @@ hash_join(hash_table * hid, hash_link * lnk)
     i = hid->hash(lnk->key, hid->size);
     lnk->next = hid->buckets[i];
     hid->buckets[i] = lnk;
-    hid->count++;
+    ++hid->count;
 }
 
 /**
@@ -268,7 +268,7 @@ hash_remove_link(hash_table * hid, hash_link * hl)
             if (NULL == hid->next)
                 hash_next_bucket(hid);
         }
-        hid->count--;
+        --hid->count;
         return;
     }
     assert(0);
@@ -295,9 +295,9 @@ hashFreeItems(hash_table * hid, HASHFREE * free_func)
     hash_first(hid);
     while ((l = hash_next(hid)) && i < hid->count) {
         *(list + i) = l;
-        i++;
+        ++i;
     }
-    for (int j = 0; j < i; j++)
+    for (int j = 0; j < i; ++j)
         free_func(*(list + j));
     xfree(list);
 }
@@ -334,7 +334,7 @@ hashPrime(int n)
     int best_prime = hash_primes[0];
     double min = fabs(log((double) n) - log((double) hash_primes[0]));
     double d;
-    for (int i = 0; i < I; i++) {
+    for (int i = 0; i < I; ++i) {
         d = fabs(log((double) n) - log((double) hash_primes[i]));
         if (d > min)
             continue;
index ad5f8e8dc5d15afaa2bd5cc6662ac3e1d5f81830..cc5181777178430fc8e0b2eebe6bce91f5965115 100644 (file)
@@ -124,8 +124,8 @@ check_init(void)
     /* calloc the ptrs so that we don't see them when hunting lost memory */
     malloc_ptrs = calloc(DBG_ARRY_BKTS, sizeof(*malloc_ptrs));
 
-    for (B = 0; B < DBG_ARRY_BKTS; B++) {
-        for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (B = 0; B < DBG_ARRY_BKTS; ++B) {
+        for (I = 0; I < DBG_ARRY_SZ; ++I) {
             malloc_ptrs[B][I] = NULL;
             malloc_size[B][I] = 0;
 #if XMALLOC_TRACE
@@ -147,7 +147,7 @@ check_free(void *s)
     int B, I;
     B = DBG_HASH_BUCKET(s);
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (malloc_ptrs[B][I] != s)
             continue;
 
@@ -189,7 +189,7 @@ check_malloc(void *p, size_t sz)
 
     B = DBG_HASH_BUCKET(p);
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (!(P = malloc_ptrs[B][I]))
             continue;
 
@@ -206,7 +206,7 @@ check_malloc(void *p, size_t sz)
         }
     }
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (malloc_ptrs[B][I])
             continue;
 
@@ -244,7 +244,7 @@ xmallocblksize(void *p)
     int B, I;
     B = DBG_HASH_BUCKET(p);
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (malloc_ptrs[B][I] == p)
             return malloc_size[B][I];
     }
@@ -261,7 +261,7 @@ malloc_file_name(void *p)
     int B, I;
     B = DBG_HASH_BUCKET(p);
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (malloc_ptrs[B][I] == p)
             return malloc_file[B][I];
     }
@@ -275,7 +275,7 @@ malloc_line_number(void *p)
     int B, I;
     B = DBG_HASH_BUCKET(p);
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (malloc_ptrs[B][I] == p)
             return malloc_line[B][I];
     }
@@ -289,7 +289,7 @@ malloc_number(void *p)
     int B, I;
     B = DBG_HASH_BUCKET(p);
 
-    for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (I = 0; I < DBG_ARRY_SZ; ++I) {
         if (malloc_ptrs[B][I] == p)
             return malloc_count[B][I];
     }
@@ -350,7 +350,7 @@ xmalloc_scan_region(void *start, int size, int depth)
         if (p && p != start) {
             B = DBG_HASH_BUCKET(p);
 
-            for (I = 0; I < DBG_ARRY_SZ; I++) {
+            for (I = 0; I < DBG_ARRY_SZ; ++I) {
                 if (malloc_ptrs[B][I] == p) {
                     if (!malloc_refs[B][I]++) {
                         /* A new reference */
@@ -399,8 +399,8 @@ xmalloc_find_leaks(void)
     fprintf(stderr, "----- Memory map ----\n");
     xmalloc_scan_region(&_etext, (void *) sbrk(0) - (void *) &_etext, 0);
 
-    for (B = 0; B < DBG_ARRY_BKTS; B++) {
-        for (I = 0; I < DBG_ARRY_SZ; I++) {
+    for (B = 0; B < DBG_ARRY_BKTS; ++B) {
+        for (I = 0; I < DBG_ARRY_SZ; ++I) {
             if (malloc_ptrs[B][I] && malloc_refs[B][I] == 0) {
                 /* Found a leak... */
                 fprintf(stderr, "Leak found: %p", malloc_ptrs[B][I]);
index 5a71feebf1c590fe556b8fdd1ee167717477786a..def632c14af8d761e673c06352f51bb3dd109f78 100644 (file)
@@ -137,25 +137,25 @@ ntlm_fetch_string(const ntlmhdr *packet, const int32_t packet_size, const strhdr
         unsigned short *s = (unsigned short *)rv.str;
         rv.str = d = buf;
 
-        for (l >>= 1; l; s++, l--) {
+        for (l >>= 1; l; ++s, --l) {
             unsigned short c = le16toh(*s);
             if (c > 254 || c == '\0') {
                 fprintf(stderr, "ntlmssp: bad unicode: %04x\n", c);
                 return rv;
             }
             *d++ = c;
-            rv.l++;
+            ++rv.l;
         }
     } else {
         /* ASCII/OEM string */
         char *sc = rv.str;
 
-        for (; l>=0; sc++, l--) {
+        for (; l>=0; ++sc, --l) {
             if (*sc == '\0' || !xisprint(*sc)) {
                 fprintf(stderr, "ntlmssp: bad ascii: %04x\n", *sc);
                 return rv;
             }
-            rv.l++;
+            ++rv.l;
         }
     }
 
@@ -209,7 +209,7 @@ ntlm_make_nonce(char *nonce)
     int r = (int) rand();
     r = (hash ^ r) + r;
 
-    for (i = 0; i < NTLM_NONCE_LEN; i++) {
+    for (i = 0; i < NTLM_NONCE_LEN; ++i) {
         nonce[i] = r;
         r = (r >> 2) ^ r;
     }
index a608ae888eea24051dad8dcf855cbec1e6a8360d..7a6ec7ca1b290fa3d7771035819b5fd0e6e93885 100644 (file)
@@ -161,7 +161,7 @@ xprof_update(xprof_stats_data * head)
     if (head->worst < head->delta)
         head->worst = head->delta;
     head->summ += head->delta;
-    head->count++;
+    ++head->count;
 }
 
 static xprof_stats_data *xp_UNACCOUNTED;
@@ -209,7 +209,7 @@ xprof_start(xprof_type type, const char *timer)
     cstack[cstack_head].accum = 0;
     cstack[cstack_head].timer = type;
     cstack[cstack_head].name = timer;
-    cstack_head++;
+    ++cstack_head;
     assert(cstack_head < MAXSTACKDEPTH);
 
 }
@@ -219,7 +219,7 @@ xprof_stop(xprof_type type, const char *timer)
 {
     hrtime_t tt = get_tick();
     assert(cstack_head > 0);
-    cstack_head--;
+    --cstack_head;
     assert(cstack[cstack_head].timer == type);
 
     /* Record timer details */
index bf54622dbe125dcd9acff1a2147c9c5ae9f78f95..b584eb57ba3ce1dfe245ca481ac0b8b84716bf84 100644 (file)
@@ -201,12 +201,14 @@ CBDATA_TYPE(ASState);
 void
 asnInit(void)
 {
-    static int inited = 0;
+    static bool inited = false;
     squid_max_keylen = 40;
     CBDATA_INIT_TYPE(ASState);
 
-    if (0 == inited++)
+    if (!inited) {
+        inited = true;
         squid_rn_init();
+    }
 
     squid_rn_inithead(&AS_tree_head, 8);
 
@@ -310,9 +312,9 @@ asHandleReply(void *data, StoreIOBuffer result)
 
     while ((size_t)(s - buf) < result.length + asState->reqofs && *s != '\0') {
         while (*s && xisspace(*s))
-            s++;
+            ++s;
 
-        for (t = s; *t; t++) {
+        for (t = s; *t; ++t) {
             if (xisspace(*t))
                 break;
         }
@@ -635,7 +637,7 @@ ACLDestinationASNStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist
     const ipcache_addrs *ia = ipcache_gethostbyname(checklist->request->GetHost(), IP_LOOKUP_IF_MISS);
 
     if (ia) {
-        for (int k = 0; k < (int) ia->count; k++) {
+        for (int k = 0; k < (int) ia->count; ++k) {
             if (data->match(ia->in_addrs[k]))
                 return 1;
         }
index 3255650678fc322d8af9c308c1af9b008cb89430..287d397f29fef8618dd8f0072b835a4c87655b5c 100644 (file)
@@ -67,7 +67,7 @@ ACLDestinationIP::match(ACLChecklist *cl)
     if (ia) {
         /* Entry in cache found */
 
-        for (int k = 0; k < (int) ia->count; k++) {
+        for (int k = 0; k < (int) ia->count; ++k) {
             if (ACLIP::match(ia->in_addrs[k]))
                 return 1;
         }
index 90c5eec138b8d561c3483b15593c4bfc9e6b4c4b..42ad7569de7727b471d9fe69f4e07dfa88979323 100644 (file)
@@ -214,7 +214,7 @@ aclParseAclList(ConfigParser &parser, ACLList ** head)
 
         if (*t == '!') {
             L->negated (true);
-            t++;
+            ++t;
         }
 
         debugs(28, 3, "aclParseAclList: looking for ACL name '" << t << "'");
index b1c05c360c5b631dfad1ef8c25107f6c6bbfdbab..a91d464a654e2f60e3eff00cbb4e8151de83371b 100644 (file)
@@ -99,7 +99,7 @@ acl_ip_data::toStr(char *buf, int len) const
 
     if (!addr2.IsAnyAddr()) {
         b2[0] = '-';
-        rlen++;
+        ++rlen;
         addr2.NtoA(&(b2[1]), len - rlen );
         rlen = strlen(buf);
     } else
@@ -109,7 +109,7 @@ acl_ip_data::toStr(char *buf, int len) const
 
     if (!mask.IsNoAddr()) {
         b3[0] = '/';
-        rlen++;
+        ++rlen;
         int cidr =  mask.GetCIDR() - (addr1.IsIPv4()?96:0);
         snprintf(&(b3[1]), (len-rlen), "%u", (unsigned int)(cidr<0?0:cidr) );
     } else
index 2138e46c4d0b2dcece7c25a17bd8052fdf80c829..34b99fb14ec3f0bf701cd1b713445c9b3a18943f 100644 (file)
@@ -238,11 +238,11 @@ compileOptimisedREs(relist **curlist, wordlist * wl)
             if (largeREindex > 0)
                 largeRE[largeREindex++] = '|';
             largeRE[largeREindex++] = '(';
-            for (char * t = wl->key; *t != '\0'; t++)
+            for (char * t = wl->key; *t != '\0'; ++t)
                 largeRE[largeREindex++] = *t;
             largeRE[largeREindex++] = ')';
             largeRE[largeREindex] = '\0';
-            numREs++;
+            ++numREs;
         } else {
             debugs(28, 2, "compileOptimisedREs: buffer full, generating new optimised RE..." );
             newlistp = compileRE( newlistp, largeRE, flags );
index 17a1d79ef915294cd5d5284e08897cd2786195dc..e19e81a67a0ef25cd5cdcd9d677862fe4a4edd05 100644 (file)
@@ -226,7 +226,7 @@ Adaptation::Config::finalize()
         ServicePointer s = createService(cfg);
         if (s != NULL) {
             AllServices().push_back(s);
-            created++;
+            ++created;
         }
     }
 
@@ -285,7 +285,7 @@ Adaptation::Config::ParseMetaHeader(ConfigParser &parser)
     ConfigParser::ParseQuotedString(&value);
 
     // TODO: Find a way to move this check to ICAP
-    for (int i = 0; warnFor[i] != NULL; i++) {
+    for (int i = 0; warnFor[i] != NULL; ++i) {
         if (name.caseCmp(warnFor[i]) == 0) {
             fatalf("%s:%d: meta name \"%s\" is a reserved ICAP header name",
                    cfg_filename, config_lineno, name.termedBuf());
index ecffe2e19a37387538c0b98aa8df4fc4f7b5889a..48d43a78571aea410ef84313f10734e303cd2c99 100644 (file)
@@ -187,7 +187,7 @@ Adaptation::ServiceConfig::grokUri(const char *value)
         if ((t = strchr(s, ']')) == NULL)
             return false;
 
-        s++;
+        ++s;
         len = t - s;
         if ((e = strchr(t, ':')) != NULL) {
             have_port = true;
@@ -212,7 +212,7 @@ Adaptation::ServiceConfig::grokUri(const char *value)
 
     port = -1;
     if (have_port) {
-        s++;
+        ++s;
 
         if ((e = strchr(s, '/')) != NULL) {
             char *t;
@@ -235,7 +235,7 @@ Adaptation::ServiceConfig::grokUri(const char *value)
 
     // if no port, the caller may use service_configConfigs or supply the default if neeeded
 
-    s++;
+    ++s;
     e = strchr(s, '\0');
     len = e - s;
 
index 25823921dcdb7d659b0328b116e7de14e7ce9d3c..298143d2fb7c0fbce001359bd9f9988a9284d901 100644 (file)
@@ -479,7 +479,7 @@ void Adaptation::Icap::ServiceRep::checkOptions()
 
             method_list.append(ICAP::methodStr(*iter));
             method_list.append(" ", 1);
-            iter++;
+            ++iter;
         }
 
         if (!method_found) {
index a86a866f1ffb219d238499d787cb739bab9e7a94..960fe56660d527d98db3bd971b89959150f5af9c 100644 (file)
@@ -140,10 +140,10 @@ Auth::User::absorb(Auth::User::Pointer from)
             if (!found) {
                 /* This ip is not in the seen list. Add it. */
                 dlinkAddTail(&new_ipdata->node, &ipdata->node, &ip_list);
-                ipcount++;
+                ++ipcount;
                 /* remove from the source list */
                 dlinkDelete(&new_ipdata->node, &(from->ip_list));
-                from->ipcount--;
+                ++from->ipcount;
             }
         }
     }
@@ -334,7 +334,7 @@ Auth::User::addIp(Ip::Address ipaddr)
 
     dlinkAddTail(ipdata, &ipdata->node, &ip_list);
 
-    ipcount++;
+    ++ipcount;
 
     debugs(29, 2, HERE << "user '" << username() << "' has been seen at a new IP address (" << ipaddr << ")");
 }
index 00531121ec28dd479af6f88f49b4401053d85055..cf506c55b8a921fe4c69885a4f48ea4a6bfb3c59 100644 (file)
@@ -223,11 +223,11 @@ Auth::Basic::Config::decodeCleartext(const char *httpAuthHeader)
 
     /* trim BASIC from string */
     while (xisgraph(*proxy_auth))
-        proxy_auth++;
+        ++proxy_auth;
 
     /* Trim leading whitespace before decoding */
     while (xisspace(*proxy_auth))
-        proxy_auth++;
+        ++proxy_auth;
 
     /* Trim trailing \n before decoding */
     // XXX: really? is the \n actually still there? does the header parse not drop it?
index 6765b65ac05fede85e266784f301ba07f51a8a59..01895d9c9542f2fecc8fae221d3218f6b5b6b231 100644 (file)
@@ -186,7 +186,7 @@ authenticateDigestNonceNew(void)
         /* create a new nonce */
         newnonce->noncedata.randomdata = squid_random();
         /* Bug 3526 high performance fix: add 1 second to creationtime to avoid duplication */
-        newnonce->noncedata.creationtime++;
+        ++newnonce->noncedata.creationtime;
         authDigestNonceEncode(newnonce);
     }
 
@@ -298,7 +298,7 @@ static void
 authDigestNonceLink(digest_nonce_h * nonce)
 {
     assert(nonce != NULL);
-    nonce->references++;
+    ++nonce->references;
     debugs(29, 9, "authDigestNonceLink: nonce '" << nonce << "' now at '" << nonce->references << "'.");
 }
 
@@ -379,7 +379,7 @@ authDigestNonceIsValid(digest_nonce_h * nonce, char nc[9])
 
     /* is the nonce-count ok ? */
     if (!static_cast<Auth::Digest::Config*>(Auth::Config::Find("digest"))->CheckNonceCount) {
-        nonce->nc++;
+        ++nonce->nc;
         return -1;              /* forced OK by configuration */
     }
 
@@ -796,11 +796,11 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     /* trim DIGEST from string */
 
     while (xisgraph(*proxy_auth))
-        proxy_auth++;
+        ++proxy_auth;
 
     /* Trim leading whitespace before decoding */
     while (xisspace(*proxy_auth))
-        proxy_auth++;
+        ++proxy_auth;
 
     String temp(proxy_auth);
 
index e0fa1964b9b89f03fd292ca4135f3f9317679026..f4e23897f6f50d475d5b963563fa005003038e77 100644 (file)
@@ -179,13 +179,13 @@ Auth::Negotiate::UserRequest::authenticate(HttpRequest * aRequest, ConnStateData
 
     if (blob) {
         while (xisspace(*blob) && *blob)
-            blob++;
+            ++blob;
 
         while (!xisspace(*blob) && *blob)
-            blob++;
+            ++blob;
 
         while (xisspace(*blob) && *blob)
-            blob++;
+            ++blob;
     }
 
     switch (user()->credentials()) {
index efdb33d25584099238bec4e01e06ab8acee0d9a1..9fbf7b8e6b05647cc98a0fadbc464b901c9f36aa 100644 (file)
@@ -173,13 +173,13 @@ Auth::Ntlm::UserRequest::authenticate(HttpRequest * aRequest, ConnStateData * co
     /* if proxy_auth is actually NULL, we'd better not manipulate it. */
     if (blob) {
         while (xisspace(*blob) && *blob)
-            blob++;
+            ++blob;
 
         while (!xisspace(*blob) && *blob)
-            blob++;
+            ++blob;
 
         while (xisspace(*blob) && *blob)
-            blob++;
+            ++blob;
     }
 
     switch (user()->credentials()) {
@@ -262,7 +262,7 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, void *lastserver, char *reply)
     /* seperate out the useful data */
     blob = strchr(reply, ' ');
     if (blob)
-        blob++;
+        ++blob;
 
     if (strncasecmp(reply, "TT ", 3) == 0) {
         /* we have been given a blob to send to the client */
index 30aab6c4bba02fcd5e311cf45ca18aa69d53912b..60fd7304e81eeb54903be58b04aa2c78981a79e1 100644 (file)
@@ -51,12 +51,12 @@ unsigned int TextException::FileNameHash(const char *fname)
     s = strrchr(fname, '/');
 
     if (s)
-        s++;
+        ++s;
     else
         s = fname;
 
     while (*s) {
-        j++;
+        ++j;
         n ^= 271 * (unsigned) *s++;
     }
     i = n ^ (j * 271);
index 9d6cdc0405b3fc79cd61bd12cd81b87e83b0398e..5b17dd290e6ff4d281613f547562632c472339c0 100644 (file)
@@ -765,7 +765,7 @@ peer_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn)
         int no = name[current->len] ;
         int i;
         // Note: This works because the Config.peers keeps its index according to its position.
-        for ( i=0 ; peers && (i < no) ; peers = peers->next , i++ ) ;
+        for ( i=0 ; peers && (i < no) ; peers = peers->next , ++i ) ;
 
         if (peers) {
             debugs(49, 6, "snmp peer_Inst: Encode peer #" << i);