]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Tamed slab signedness warning on 32-bit architectures
authorMaria Matejka <mq@ucw.cz>
Wed, 12 Oct 2022 08:44:18 +0000 (10:44 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Oct 2022 08:44:18 +0000 (10:44 +0200)
lib/slab.c

index 054daea126874cc14861f3224ef018a0b6231275..cf2ecc7043b9f2d996e55a045c7ae6ead7cc66c6 100644 (file)
@@ -236,7 +236,7 @@ sl_new(pool *p, uint size)
       + sizeof(u32) * s->head_bitfield_len
       + align - 1)
     / align * align;
-  } while (s->objs_per_slab * size + s->head_size > page_size);
+  } while (s->objs_per_slab * size + s->head_size > (size_t) page_size);
 
   if (!s->objs_per_slab)
     bug("Slab: object too large");