1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-06-03 16:26:27 +02:00

(do_link): Use SAME_INODE rather than open-coding it.

This commit is contained in:
Jim Meyering
2003-08-30 20:26:42 +00:00
parent ab7bdb3919
commit 27a8f1e732
+1 -2
View File
@@ -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