summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-10-04 23:36:35 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-10-04 23:44:56 +0200
commitbaea971bfbe98c8503d464d2934fb32b50eab6b7 (patch)
tree89e9630f01c2bb99a1d16b4fef8840bddaebf85e
parent7e6245aa708526949100478f5847704a7dd6eac2 (diff)
sfeed_mbox: small cleanup, move label so check for NUL isnt needed
-rw-r--r--sfeed_mbox.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index 0ee5bfd..6b14786 100644
--- a/sfeed_mbox.c
+++ b/sfeed_mbox.c
@@ -40,8 +40,8 @@ printcontent(const char *s, FILE *fp)
if (!strncmp(s, "From ", 5))
fputc('>', fp);
- for (; *s; s++) {
read:
+ for (; *s; s++) {
switch (*s) {
case '\\':
switch (*(++s)) {
@@ -58,7 +58,6 @@ read:
goto read;
}
break;
- case '\0': return; /* ignore */
case '\n':
fputc((int)*s, fp);
for (s++; *s && *s == '>'; s++)
@@ -149,8 +148,7 @@ main(int argc, char *argv[])
printfeed(stdin, "");
} else {
for (i = 1; i < argc; i++) {
- fp = fopen(argv[i], "r");
- if (!fp)
+ if (!(fp = fopen(argv[i], "r")))
err(1, "fopen: %s", argv[i]);
name = xbasename(argv[i]);
printfeed(fp, name);