summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb/pwd_mkdb.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-10-10 06:27:07 +0000
committercharnier <charnier@FreeBSD.org>1997-10-10 06:27:07 +0000
commitb93d92dbcd6b74a963fa228fcb3e6c8148017b1a (patch)
tree637981f27cf8061dedd767833027d1860432d104 /usr.sbin/pwd_mkdb/pwd_mkdb.c
parentc4198a70c7f56d54ec13a8e63e0f03bb8ad51d5d (diff)
downloadFreeBSD-src-b93d92dbcd6b74a963fa228fcb3e6c8148017b1a.zip
FreeBSD-src-b93d92dbcd6b74a963fa228fcb3e6c8148017b1a.tar.gz
Staticize usage(). Cosmetics.
Diffstat (limited to 'usr.sbin/pwd_mkdb/pwd_mkdb.c')
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c
index 4f0e177..c856536 100644
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.c
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c
@@ -32,13 +32,17 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1991, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/param.h>
@@ -85,7 +89,7 @@ void error __P((char *));
void cp __P((char *, char *, mode_t mode));
void mv __P((char *, char *));
int scan __P((FILE *, struct passwd *));
-void usage __P((void));
+static void usage __P((void));
int
main(argc, argv)
@@ -278,7 +282,7 @@ main(argc, argv)
if (!Cflag &&
(pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-'))
yp_enabled = 1;
-#define COMPACT(e) t = e; while (*p++ = *t++);
+#define COMPACT(e) t = e; while ((*p++ = *t++));
if (!Cflag &&
(!username || (strcmp(username, pwd.pw_name) == 0))) {
/* Create insecure data. */
@@ -538,7 +542,7 @@ error(name)
char *name;
{
- warn(name);
+ warn("%s", name);
cleanup();
exit(1);
}
@@ -563,10 +567,11 @@ cleanup()
}
}
-void
+static void
usage()
{
- (void)fprintf(stderr, "usage: pwd_mkdb [-c] [-p] [-d <dest dir>] [-u <local username>] file\n");
+ (void)fprintf(stderr,
+"usage: pwd_mkdb [-c] [-p] [-d <dest dir>] [-u <local username>] file\n");
exit(1);
}
OpenPOWER on IntegriCloud