diff options
author | Jim Meyering <jim@meyering.net> | 2003-01-25 16:44:07 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-01-25 16:44:07 +0000 |
commit | 431d1b624180925a9be02590d4c5af845b8e2fce (patch) | |
tree | 3ebc679e9ca181000e2d2794d979ba89b8f8e9b5 /lib | |
parent | 29faf21e9461eecd14cef2cd2d8e90f6aaab5cbf (diff) | |
download | coreutils-431d1b624180925a9be02590d4c5af845b8e2fce.tar.xz |
(object_compare): Compare inode numbers before device numbers.
The former is much more likely to differ for any two given file objects.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftw.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -213,10 +213,10 @@ object_compare (const void *p1, const void *p2) accidentally compare `holes' in the structure. */ const struct known_object *kp1 = p1, *kp2 = p2; int cmp1; - cmp1 = (kp1->dev > kp2->dev) - (kp1->dev < kp2->dev); + cmp1 = (kp1->ino > kp2->ino) - (kp1->ino < kp2->ino); if (cmp1 != 0) return cmp1; - return (kp1->ino > kp2->ino) - (kp1->ino < kp2->ino); + return (kp1->dev > kp2->dev) - (kp1->dev < kp2->dev); } |