]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(do_link): Use SAME_INODE rather than open-coding it.
authorJim Meyering <jim@meyering.net>
Sat, 30 Aug 2003 20:26:42 +0000 (20:26 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 30 Aug 2003 20:26:42 +0000 (20:26 +0000)
src/ln.c

index 2afeb98cacb1a3dd2dcc54e2ebd01109ea0e9add..35a879033ac70f95a22125d70b88d8308abfa138 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -227,8 +227,7 @@ do_link (const char *source, const char *dest)
         misleading.  */
       && (backup_type == none || !symbolic_link)
       && (!symbolic_link || stat (source, &source_stats) == 0)
-      && source_stats.st_dev == dest_stats.st_dev
-      && source_stats.st_ino == dest_stats.st_ino
+      && SAME_INODE (source_stats, dest_stats)
       /* The following detects whether removing DEST will also remove
         SOURCE.  If the file has only one link then both are surely
         the same link.  Otherwise check whether they point to the same