summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/sdiff/common.c4
-rw-r--r--usr.bin/sdiff/edit.c9
-rw-r--r--usr.bin/sdiff/sdiff.c7
3 files changed, 4 insertions, 16 deletions
diff --git a/usr.bin/sdiff/common.c b/usr.bin/sdiff/common.c
index b814ccbbad9..9bf600a2310 100644
--- a/usr.bin/sdiff/common.c
+++ b/usr.bin/sdiff/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.2 2006/03/11 07:12:42 ray Exp $ */
+/* $OpenBSD: common.c,v 1.3 2006/05/10 14:32:51 ray Exp $ */
/*
* Written by Raymond Lai <ray@cyth.net>.
@@ -55,14 +55,12 @@ xmktemp(const char *s)
if ((file = fdopen(fd, "w")) == NULL) {
warn("could not open %s", filename);
cleanup(filename);
- /* NOTREACHED */
}
/* Write to file. */
if (fputs(s, file)) {
warn("could not write to %s", filename);
cleanup(filename);
- /* NOTREACHED */
}
/* Close temp file. */
diff --git a/usr.bin/sdiff/edit.c b/usr.bin/sdiff/edit.c
index d282e7fcfbf..58099207fbd 100644
--- a/usr.bin/sdiff/edit.c
+++ b/usr.bin/sdiff/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.12 2006/02/20 08:38:18 otto Exp $ */
+/* $OpenBSD: edit.c,v 1.13 2006/05/10 14:32:51 ray Exp $ */
/*
* Written by Raymond Lai <ray@cyth.net>.
@@ -42,11 +42,9 @@ edit(const char *filename)
execlp(editor, editor, filename, (void *)NULL);
warn("could not execute editor: %s", editor);
cleanup(filename);
- /* NOTREACHED */
case -1:
warn("could not fork");
cleanup(filename);
- /* NOTREACHED */
}
/* parent */
@@ -54,14 +52,12 @@ edit(const char *filename)
if (waitpid(pid, &status, 0) == -1) {
warn("waitpid");
cleanup(filename);
- /* NOTREACHED */
}
/* Check that editor terminated normally. */
if (!WIFEXITED(status)) {
warn("%s terminated abnormally", editor);
cleanup(filename);
- /* NOTREACHED */
}
}
@@ -137,7 +133,6 @@ RIGHT:
if (!(file = fopen(filename, "r"))) {
warn("could not open edited file: %s", filename);
cleanup(filename);
- /* NOTREACHED */
}
/* Copy temporary file contents to output file. */
@@ -148,7 +143,6 @@ RIGHT:
(ferror(file) || !feof(file))) {
warnx("error reading edited file: %s", filename);
cleanup(filename);
- /* NOTREACHED */
}
/*
@@ -163,7 +157,6 @@ RIGHT:
if (nwritten != nread) {
warnx("error writing to output file");
cleanup(filename);
- /* NOTREACHED */
}
}
diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c
index 5ce8fe73a1b..b0ed9b99954 100644
--- a/usr.bin/sdiff/sdiff.c
+++ b/usr.bin/sdiff/sdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdiff.c,v 1.17 2006/03/05 07:12:26 otto Exp $ */
+/* $OpenBSD: sdiff.c,v 1.18 2006/05/10 14:32:51 ray Exp $ */
/*
* Written by Raymond Lai <ray@cyth.net>.
@@ -235,17 +235,14 @@ main(int argc, char **argv)
break;
default:
usage();
- /* NOTREACHED */
}
}
argc -= optind;
argv += optind;
- if (argc != 2) {
+ if (argc != 2)
usage();
- /* NOTREACHED */
- }
filename1 = argv[0];
filename2 = argv[1];