summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-06-07 02:30:56 +0000
committertjr <tjr@FreeBSD.org>2002-06-07 02:30:56 +0000
commitc4d587cfbcb2f254050e7e1af5af72676d2e2c4a (patch)
treecbdd0ed9662bf38a5fbbd1ea2d6f0b7ab557abe2 /usr.bin/cmp
parentbe7ae7357c076c968d7f92dcad29bd6162d12d58 (diff)
downloadFreeBSD-src-c4d587cfbcb2f254050e7e1af5af72676d2e2c4a.zip
FreeBSD-src-c4d587cfbcb2f254050e7e1af5af72676d2e2c4a.tar.gz
Exit >1 when an error occurs, regardless of whether -s is specified (SUSv3)
Diffstat (limited to 'usr.bin/cmp')
-rw-r--r--usr.bin/cmp/cmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c
index 162c6cd..1184abe 100644
--- a/usr.bin/cmp/cmp.c
+++ b/usr.bin/cmp/cmp.c
@@ -116,7 +116,7 @@ endargs:
if (!sflag)
err(ERR_EXIT, "%s", file1);
else
- exit(1);
+ exit(ERR_EXIT);
}
if (strcmp(file2 = argv[1], "-") == 0) {
if (special)
@@ -130,7 +130,7 @@ endargs:
if (!sflag)
err(ERR_EXIT, "%s", file2);
else
- exit(1);
+ exit(ERR_EXIT);
}
skip1 = argc > 2 ? strtol(argv[2], NULL, 0) : 0;
@@ -141,7 +141,7 @@ endargs:
if (!sflag)
err(ERR_EXIT, "%s", file1);
else
- exit(1);
+ exit(ERR_EXIT);
}
if (!S_ISREG(sb1.st_mode))
special = 1;
@@ -150,7 +150,7 @@ endargs:
if (!sflag)
err(ERR_EXIT, "%s", file2);
else
- exit(1);
+ exit(ERR_EXIT);
}
if (!S_ISREG(sb2.st_mode))
special = 1;
OpenPOWER on IntegriCloud