diff --git a/ChangeLog b/ChangeLog index 16c6ef6e8..6c0f03b7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-13 Vladimir Serbinenko + + * grub-core/fs/zfs/zfs.c (ZAP_LEAF_NUMCHUNKS): Use unsigned arithmetics. + 2013-11-13 Vladimir Serbinenko * grub-core/normal/datetime.c (grub_get_weekday): Use if rather than diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c index d0a4d9cc7..4d0bde4ce 100644 --- a/grub-core/fs/zfs/zfs.c +++ b/grub-core/fs/zfs/zfs.c @@ -129,7 +129,7 @@ LEAF_HASH (int bs, grub_uint64_t h, zap_leaf_phys_t *l) static inline int ZAP_LEAF_NUMCHUNKS (int bs) { - return (((1 << bs) - 2 * ZAP_LEAF_HASH_NUMENTRIES (bs)) / + return (((1U << bs) - 2 * ZAP_LEAF_HASH_NUMENTRIES (bs)) / ZAP_LEAF_CHUNKSIZE - 2); }