diff options
author | 2003-07-21 21:57:22 +0000 | |
---|---|---|
committer | 2003-07-21 21:57:22 +0000 | |
commit | fed3a06d29f0c37869ea3fabb132d895d15a1277 (patch) | |
tree | 182e33e5d946a92fe5f0dc4595d4dadf72b978e2 /usr.bin/diff/diffreg.c | |
parent | updated license (diff) | |
download | wireguard-openbsd-fed3a06d29f0c37869ea3fabb132d895d15a1277.tar.xz wireguard-openbsd-fed3a06d29f0c37869ea3fabb132d895d15a1277.zip |
POSIX-compliant output when there are two paths w/ the same name but
one is a file and the other is a directory in -r mode (cosmetic).
Diffstat (limited to 'usr.bin/diff/diffreg.c')
-rw-r--r-- | usr.bin/diff/diffreg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index d980115d769..2abd158cb4d 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.36 2003/07/21 15:56:48 millert Exp $ */ +/* $OpenBSD: diffreg.c,v 1.37 2003/07/21 21:57:22 millert Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -65,7 +65,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.36 2003/07/21 15:56:48 millert Exp $"; +static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.37 2003/07/21 21:57:22 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -291,7 +291,7 @@ diffreg(char *ofile1, char *ofile2, int flags) context_vec_ptr = context_vec_start - 1; chrtran = (iflag ? cup2low : clow2low); if (S_ISDIR(stb1.st_mode) != S_ISDIR(stb2.st_mode)) - return (D_MISMATCH); + return (S_ISDIR(stb1.st_mode) ? D_MISMATCH1 : D_MISMATCH2); if (strcmp(file1, "-") == 0 && strcmp(file2, "-") == 0) goto notsame; |