From c12c2b6b3ede51cabf59092b3d09bd2171534ddb Mon Sep 17 00:00:00 2001 From: Curt McDowell Date: Mon, 18 Dec 2017 20:32:18 -0800 Subject: [PATCH] compare full 8-byte inodes in one more place * libidu/walker.c (dev_ino_hash_compare): Rewrite to compare both device and full inode. --- libidu/walker.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libidu/walker.c b/libidu/walker.c index 82a2392..a21e239 100644 --- a/libidu/walker.c +++ b/libidu/walker.c @@ -1139,16 +1139,11 @@ DEV_INO_HASH_DEFUN(dev_ino_hash_1, xform_NOP) DEV_INO_HASH_DEFUN(dev_ino_hash_2, xform_NOT) static int -dev_ino_hash_compare (void const *x, void const *y) +dev_ino_hash_compare (void const *xv, void const *yv) { - int result; - INTEGER_COMPARE (((struct dev_ino const *) x)->di_ino, - ((struct dev_ino const *) y)->di_ino, result); - if (result) - return result; - INTEGER_COMPARE (((struct dev_ino const *) x)->di_dev, - ((struct dev_ino const *) y)->di_dev, result); - return result; + struct dev_ino const *x = xv; + struct dev_ino const *y = yv; + return x->di_ino == y->di_ino && x->di_dev == y->di_dev; } #endif -- 2.15.1.354.g95ec6b1b3