summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-05-23 03:03:44 +0000
committerjmallett <jmallett@FreeBSD.org>2002-05-23 03:03:44 +0000
commit28296cf1d344cb36dbac1b4662e707b88c066a06 (patch)
tree7201bba679cd3b730c4a93dfd44d43fb7eb73546 /usr.bin
parentbc5da2aaa33d76771cd47cf90371acbb01d74278 (diff)
downloadFreeBSD-src-28296cf1d344cb36dbac1b4662e707b88c066a06.zip
FreeBSD-src-28296cf1d344cb36dbac1b4662e707b88c066a06.tar.gz
Make my style consistent.
Remove two includes. Fix a typo (semicolon instead of period at EOL).
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/help/help.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/help/help.c b/usr.bin/help/help.c
index beeb1e9..bba2638 100644
--- a/usr.bin/help/help.c
+++ b/usr.bin/help/help.c
@@ -14,10 +14,8 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
-#include <sys/stat.h>
#include <ctype.h>
#include <err.h>
-#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
@@ -44,8 +42,9 @@ main(int argc, char *argv[])
size_t len;
(void)printf("Enter the message number or SCCS command name: ");
- if ((key = fgetln(stdin, &len)) == NULL)
+ if ((key = fgetln(stdin, &len)) == NULL) {
err(1, NULL);
+ }
key[len - 1] = '\0';
return help(key);
}
@@ -56,12 +55,13 @@ main(int argc, char *argv[])
/*
* If no error occurred this time, rv becomes 1.
*/
- if (help(argv[i]) == 0)
+ if (help(argv[i]) == 0) {
rv = 1;
+ }
}
/*
- * Return 0 if at least one help() worked. Return 1 else;
+ * Return 0 if at least one help() worked. Return 1 else.
*/
return rv ? 0 : 1;
}
OpenPOWER on IntegriCloud