summaryrefslogtreecommitdiff
path: root/usr.sbin/extattrctl
diff options
context:
space:
mode:
authorChris D. Faulhaber <jedgar@FreeBSD.org>2001-11-27 18:58:56 +0000
committerChris D. Faulhaber <jedgar@FreeBSD.org>2001-11-27 18:58:56 +0000
commitf2dd987c4646a8ac38ed3491f979663b038a4294 (patch)
tree55bb024690a022233c0b25c34bc7455edb61cba7 /usr.sbin/extattrctl
parentdcd183a935ea44dff6e44a6af10c126f5d70347b (diff)
downloadsrc-test-f2dd987c4646a8ac38ed3491f979663b038a4294.tar.gz
src-test-f2dd987c4646a8ac38ed3491f979663b038a4294.zip
Make extattrctl WARNS?=2-safe:
o remove extraneous extern's o prototype functions o combine multiple return (0)'s into a single return (0) at the end of main() Approved by: rwatson Obtained from: TrustedBSD Project
Notes
Notes: svn path=/head/; revision=86994
Diffstat (limited to 'usr.sbin/extattrctl')
-rw-r--r--usr.sbin/extattrctl/Makefile1
-rw-r--r--usr.sbin/extattrctl/extattrctl.c14
2 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/extattrctl/Makefile b/usr.sbin/extattrctl/Makefile
index 496a8aa8c7c16..52142afa573b6 100644
--- a/usr.sbin/extattrctl/Makefile
+++ b/usr.sbin/extattrctl/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
PROG= extattrctl
+WARNS?= 2
MAN= extattrctl.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/extattrctl/extattrctl.c b/usr.sbin/extattrctl/extattrctl.c
index f7704219b9446..0a422eba5d71c 100644
--- a/usr.sbin/extattrctl/extattrctl.c
+++ b/usr.sbin/extattrctl/extattrctl.c
@@ -48,11 +48,12 @@
#include <string.h>
#include <unistd.h>
-extern char *optarg;
-extern int optind;
+int initattr(int argc, char *argv[]);
+long num_inodes_by_path(char *path);
+void usage(void);
void
-usage(void)
+usage()
{
fprintf(stderr,
@@ -176,7 +177,6 @@ main(int argc, char *argv[])
perror("extattrctl start");
return (-1);
}
- return (0);
} else if (!strcmp(argv[1], "stop")) {
if (argc != 3)
usage();
@@ -186,7 +186,6 @@ main(int argc, char *argv[])
perror("extattrctl stop");
return (-1);
}
- return (0);
} else if (!strcmp(argv[1], "enable")) {
if (argc != 6)
usage();
@@ -201,7 +200,6 @@ main(int argc, char *argv[])
perror("extattrctl enable");
return (-1);
}
- return (0);
} else if (!strcmp(argv[1], "disable")) {
if (argc != 5)
usage();
@@ -216,14 +214,14 @@ main(int argc, char *argv[])
perror("extattrctl disable");
return (-1);
}
- return (0);
} else if (!strcmp(argv[1], "initattr")) {
argc -= 2;
argv += 2;
error = initattr(argc, argv);
if (error)
return (-1);
- return (0);
} else
usage();
+
+ return (0);
}