summaryrefslogtreecommitdiff
path: root/lib/slab.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-06-30 11:55:22 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-06-30 11:55:22 +0200
commit20e8d040b09f1e01c431c686f1ced5a12ba7bc68 (patch)
treee7589c90683d1d0bbb80a03d152de20893972b36 /lib/slab.c
parent8945f73d946a9323daf8dfc1bf5b3884cf6d7664 (diff)
Fixes integer overflow in show memory command.
Thanks to Job Snijders for the bugreport.
Diffstat (limited to 'lib/slab.c')
-rw-r--r--lib/slab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/slab.c b/lib/slab.c
index e236e26e..31529c30 100644
--- a/lib/slab.c
+++ b/lib/slab.c
@@ -123,7 +123,7 @@ static size_t
slab_memsize(resource *r)
{
slab *s = (slab *) r;
- int cnt = 0;
+ size_t cnt = 0;
struct sl_obj *o;
WALK_LIST(o, s->objs)
@@ -346,7 +346,7 @@ static size_t
slab_memsize(resource *r)
{
slab *s = (slab *) r;
- int heads = 0;
+ size_t heads = 0;
struct sl_head *h;
WALK_LIST(h, s->empty_heads)