summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fb33661)
~0 will be signed and negative on any 2s complement system, and
left shifting a negative value has undefined behaviour in C.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* present. If so, tain't one of ours!
*/
if (n + IDTREE_BITS < 31 &&
* present. If so, tain't one of ours!
*/
if (n + IDTREE_BITS < 31 &&
- (id & ~(~0 << MAX_ID_SHIFT)) >> (n + IDTREE_BITS))
+ (id & ~(~0U << MAX_ID_SHIFT)) >> (n + IDTREE_BITS))
return NULL;
/* Mask off upper bits we don't use for the search. */
return NULL;
/* Mask off upper bits we don't use for the search. */