summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-11-22 18:02:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-11-22 18:02:45 +0000
commite2422668b5180789f5b6dd4b419e718a43298a12 (patch)
tree5dc7942b87a65b1079b8b9065171c4d1f0b7e412 /usr.bin
parent232268c028e3c04bb593148e211d28891d01b99c (diff)
Fix diff -q exit value which was broken in last commit.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/diff/diffreg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index bedb5ef0806..74645a3c794 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffreg.c,v 1.53 2003/11/21 01:28:01 millert Exp $ */
+/* $OpenBSD: diffreg.c,v 1.54 2003/11/22 18:02:44 millert Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -65,7 +65,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.53 2003/11/21 01:28:01 millert Exp $";
+static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.54 2003/11/22 18:02:44 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -354,10 +354,9 @@ diffreg(char *ofile1, char *ofile2, int flags)
if (!asciifile(f1) || !asciifile(f2)) {
rval = D_BINARY;
+ status |= 1;
goto closem;
}
- if (format == D_BRIEF)
- goto closem;
if (lflag) {
/* redirect stdout to pr */
int pfd[2];
@@ -1023,6 +1022,8 @@ restart:
anychange = 1;
switch (format) {
+ case D_BRIEF:
+ return;
case D_NORMAL:
case D_EDIT:
range(a, b, ",");