summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6994f3d)
(Imported from SAMBA commit
2db1987f5a3a)
Right-shifting signed integers in undefined; indeed it seems that on
AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives
0, not 1 as we might expect (THIS WAS WRONG, REAL FIX LATER).
The obvious fix is to make id and oid unsigned: l (level count) is also
logically unsigned.
(Note: Samba doesn't generally get to ids > 1 billion, but ctdb does)
Reported-by: Chris Cowan <cc@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
int n, m, sh;
struct idtree_layer *p, *pn;
struct idtree_layer *pa[MAX_LEVEL];
int n, m, sh;
struct idtree_layer *p, *pn;
struct idtree_layer *pa[MAX_LEVEL];
+ unsigned int l, id, oid;
uint32_t bm;
memset(pa, 0, sizeof(pa));
uint32_t bm;
memset(pa, 0, sizeof(pa));