diff options
author | tb <tb@cvs.openbsd.org> | 2016-03-05 17:15:44 +0000 |
---|---|---|
committer | tb <tb@cvs.openbsd.org> | 2016-03-05 17:15:44 +0000 |
commit | 03d7045822f0ffa0503e42845bea18971d681b98 (patch) | |
tree | 801328001b4df71f9cc5577c5fe6977be6f0dc62 /sbin/mknod/mknod.c | |
parent | 8ab15ea1a475470978112de501bf00de21e9c594 (diff) |
Remove debugging code, extra whitespace and a lint annotation.
"just clean it", deraadt@; ok sha256
Diffstat (limited to 'sbin/mknod/mknod.c')
-rw-r--r-- | sbin/mknod/mknod.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sbin/mknod/mknod.c b/sbin/mknod/mknod.c index 594197aba6a..521395eaba6 100644 --- a/sbin/mknod/mknod.c +++ b/sbin/mknod/mknod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknod.c,v 1.22 2016/03/05 16:32:54 millert Exp $ */ +/* $OpenBSD: mknod.c,v 1.23 2016/03/05 17:15:43 tb Exp $ */ /* $NetBSD: mknod.c,v 1.8 1995/08/11 00:08:18 jtc Exp $ */ /* @@ -30,7 +30,6 @@ extern char *__progname; - struct node { const char *name; mode_t mode; @@ -63,19 +62,15 @@ main(int argc, char *argv[]) if (!node) err(1, NULL); - ismkfifo = strcmp(__progname, "mkfifo") == 0; - + /* we parse all arguments upfront */ while (argc > 1) { while ((ch = getopt(argc, argv, "m:")) != -1) { switch (ch) { case 'm': - if (!(set = setmode(optarg))) { + if (!(set = setmode(optarg))) errx(1, "invalid file mode."); - /* NOTREACHED */ - } - /* * In symbolic mode strings, the + and - * operators are interpreted relative to @@ -179,7 +174,6 @@ domakenodes(struct node *node, int n) int rv = 0; int i; -#if !defined(CHECK_PARSING_ONLY) for (i = 0; i != n; i++) { int r; /* @@ -200,12 +194,7 @@ domakenodes(struct node *node, int n) rv = 1; } } -#else - for (i = 0; i != n; i++) - printf("%s %c (mode %o) dev=%d\n", node[i].name, - node[i].type, node[i].mode, node[i].dev); - -#endif + free(node); return rv; } |