From d65ea9bc8dcb6cb0bab7617a8076bc3a189f2fb9 Mon Sep 17 00:00:00 2001 From: notsecure Date: Tue, 20 May 2014 06:30:15 -0400 Subject: [PATCH] equivalent bitwise not --- toxcore/list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxcore/list.c b/toxcore/list.c index 6bd6230c4..b5a3b0320 100644 --- a/toxcore/list.c +++ b/toxcore/list.c @@ -36,7 +36,7 @@ * -some considerations since the array size is never perfect */ -#define INDEX(i) (-i -1) +#define INDEX(i) (~i) /* Find data in list * @@ -141,7 +141,7 @@ int list_add(LIST *list, void *data, int id) return 0; } - i = -i - 1; + i = ~i; //increase the size of the arrays by one void *p;