summaryrefslogtreecommitdiff
path: root/usr.bin/getent
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@FreeBSD.org>2007-02-04 20:52:57 +0000
committerRalf S. Engelschall <rse@FreeBSD.org>2007-02-04 20:52:57 +0000
commit3181f5556f228a697dabec04eff661b179f7c2d5 (patch)
tree5e02bf6c80fccf84016116ad1be1708d5e1ddcb0 /usr.bin/getent
parent865b0cf06cb8f6e302a162bde1bd0161a7be069f (diff)
downloadsrc-test-3181f5556f228a697dabec04eff661b179f7c2d5.tar.gz
src-test-3181f5556f228a697dabec04eff661b179f7c2d5.zip
cleanup code: remove superfluous comma at end of enumeration
declaration, remove useless "break" after exit(3) call, and add a missing va_end(3) call.
Notes
Notes: svn path=/head/; revision=166504
Diffstat (limited to 'usr.bin/getent')
-rw-r--r--usr.bin/getent/getent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/getent/getent.c b/usr.bin/getent/getent.c
index 0694fdc751f71..d7558135b6f23 100644
--- a/usr.bin/getent/getent.c
+++ b/usr.bin/getent/getent.c
@@ -77,7 +77,7 @@ enum {
RV_OK = 0,
RV_USAGE = 1,
RV_NOTFOUND = 2,
- RV_NOENUM = 3,
+ RV_NOENUM = 3
};
static struct getentdb {
@@ -109,7 +109,6 @@ main(int argc, char *argv[])
for (curdb = databases; curdb->name != NULL; curdb++) {
if (strcmp(curdb->name, argv[1]) == 0) {
exit(curdb->callback(argc, argv));
- break;
}
}
fprintf(stderr, "Unknown database: %s\n", argv[1]);
@@ -178,6 +177,7 @@ printfmtstrings(char *strings[], const char *prefix, const char *sep,
curpref = sep;
}
printf("\n");
+ va_end(ap);
}
/*