From fed3a06d29f0c37869ea3fabb132d895d15a1277 Mon Sep 17 00:00:00 2001 From: millert Date: Mon, 21 Jul 2003 21:57:22 +0000 Subject: 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). --- usr.bin/diff/diffreg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/diff/diffreg.c') 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 @@ -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; -- cgit v1.2.3-59-g8ed1b