Commit 2b48199f authored by David Gibson's avatar David Gibson

idtree: Fix comparison is always false warning

idtree.c:146 triggers a "comparison is always false" warning on some
compiler configurations, since the 'id' variable is unsigned.

Elsewhere in the module ids seem to be represented by (signed) ints, so
use the same convention here, suppressing the warning and also maybe being
more correct in other ways.
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 71b4e3ad
......@@ -100,7 +100,8 @@ static int sub_alloc(struct idtree *idp, const void *ptr, int *starting_id)
int n, m, sh;
struct idtree_layer *p, *pn;
struct idtree_layer *pa[MAX_LEVEL+1];
unsigned int l, id, oid;
unsigned int l;
int id, oid;
uint32_t bm;
memset(pa, 0, sizeof(pa));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment