]> git.cameronkatri.com Git - getent-darwin.git/commitdiff
cleanup code: remove superfluous comma at end of enumeration
authorRalf S. Engelschall <rse@FreeBSD.org>
Sun, 4 Feb 2007 20:52:57 +0000 (20:52 +0000)
committerRalf S. Engelschall <rse@FreeBSD.org>
Sun, 4 Feb 2007 20:52:57 +0000 (20:52 +0000)
declaration, remove useless "break" after exit(3) call, and add a
missing va_end(3) call.

getent.c

index 0694fdc751f715b6a6d2ce7165dce29a682f44de..d7558135b6f236c5b93921072bfa47193a685208 100644 (file)
--- a/getent.c
+++ b/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);
 }
 
 /*