From: Jim Meyering Date: Sat, 30 Aug 2003 20:26:42 +0000 (+0000) Subject: (do_link): Use SAME_INODE rather than open-coding it. X-Git-Tag: v5.0.91~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27a8f1e732dbb2d70fb9eee82e63bc3e9a4e3fa7;p=thirdparty%2Fcoreutils.git (do_link): Use SAME_INODE rather than open-coding it. --- diff --git a/src/ln.c b/src/ln.c index 2afeb98cac..35a879033a 100644 --- 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