diff options
author | Jim Meyering <jim@meyering.net> | 2003-08-30 20:26:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-08-30 20:26:42 +0000 |
commit | 27a8f1e732dbb2d70fb9eee82e63bc3e9a4e3fa7 (patch) | |
tree | b0e6cd750a1e5cbc2633296727aa73b73792bd54 /src | |
parent | ab7bdb39190af15a2bf36d2de4089a8252c4cdc6 (diff) | |
download | coreutils-27a8f1e732dbb2d70fb9eee82e63bc3e9a4e3fa7.tar.xz |
(do_link): Use SAME_INODE rather than open-coding it.
Diffstat (limited to 'src')
-rw-r--r-- | src/ln.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |