summaryrefslogtreecommitdiff
blob: 5b703502e73c1ff5d39205beab9a7404da5f0a25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Compile fix for illegal syntax to make GCC4 happy.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Nuar -Nuar memcached-1.3.3.orig/slabs.c memcached-1.3.3/slabs.c
--- memcached-1.3.3.orig/slabs.c	2009-04-02 12:29:32.000000000 -0700
+++ memcached-1.3.3/slabs.c	2009-06-03 14:11:04.134757232 -0700
@@ -419,7 +419,7 @@
     slab = p->slab_list[p->killing - 1];
     slab_end = (char*)slab + POWER_BLOCK;
 
-    for (iter = slab; iter < slab_end; (char*)iter += p->size) {
+    for (iter = slab; iter < slab_end; iter = (char*)iter + p->size) {
         item *it = (item *)iter;
         if (it->slabs_clsid) {
             if (it->refcount) was_busy = true;
@@ -449,7 +449,7 @@
     dp->end_page_free = dp->perslab;
     /* this isn't too critical, but other parts of the code do asserts to
        make sure this field is always 0.  */
-    for (iter = slab; iter < slab_end; (char*)iter += dp->size) {
+    for (iter = slab; iter < slab_end; iter = (char*)iter + dp->size) {
         ((item *)iter)->slabs_clsid = 0;
     }
     return 1;