diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2021-10-07 15:07:00 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2021-10-07 15:07:00 +0000 |
commit | 824bbb9a40820fb62bde0a91c0f13e0b894da149 (patch) | |
tree | 7defa80b75902f0468d95807413728e740701be5 /usr.bin/diff | |
parent | 67bceb38f463d8a929c55efdcfcfefc9aedfeff6 (diff) |
Diffstat (limited to 'usr.bin/diff')
-rw-r--r-- | usr.bin/diff/diffreg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index fc3c3406a073..995843f9e539 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -440,6 +440,10 @@ files_differ(FILE *f1, FILE *f2, int flags) if ((flags & (D_EMPTY1|D_EMPTY2)) || stb1.st_size != stb2.st_size || (stb1.st_mode & S_IFMT) != (stb2.st_mode & S_IFMT)) return (1); + + if (stb1.st_dev == stb2.st_dev && stb1.st_ino == stb2.st_ino) + return (0); + for (;;) { i = fread(buf1, 1, sizeof(buf1), f1); j = fread(buf2, 1, sizeof(buf2), f2); |