Module Name:    src
Committed By:   joerg
Date:           Sat Aug 27 22:32:44 UTC 2011

Modified Files:
        src/usr.sbin/chroot: chroot.c

Log Message:
Use __dead. Move global variables into function scope.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/chroot/chroot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/chroot/chroot.c
diff -u src/usr.sbin/chroot/chroot.c:1.16 src/usr.sbin/chroot/chroot.c:1.17
--- src/usr.sbin/chroot/chroot.c:1.16	Mon Aug 15 14:43:17 2011
+++ src/usr.sbin/chroot/chroot.c	Sat Aug 27 22:32:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: chroot.c,v 1.16 2011/08/15 14:43:17 wiz Exp $	*/
+/*	$NetBSD: chroot.c,v 1.17 2011/08/27 22:32:44 joerg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)chroot.c	8.1 (Berkeley) 6/9/93";
 #else
-__RCSID("$NetBSD: chroot.c,v 1.16 2011/08/15 14:43:17 wiz Exp $");
+__RCSID("$NetBSD: chroot.c,v 1.17 2011/08/27 22:32:44 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -56,16 +56,14 @@
 #include <string.h>
 #include <unistd.h>
 
-int	main(int, char **);
-void	usage(void) __dead;
-
-char	*user;		/* user to switch to before running program */
-char	*group;		/* group to switch to ... */
-char	*grouplist;	/* group list to switch to ... */
+static void	usage(void) __dead;
 
 int
 main(int argc, char *argv[])
 {
+	char	*user;		/* user to switch to before running program */
+	char	*group;		/* group to switch to ... */
+	char	*grouplist;	/* group list to switch to ... */
 	struct group	*gp;
 	struct passwd	*pw;
 	char		*endp, *p;
@@ -175,7 +173,7 @@
 	/* NOTREACHED */
 }
 
-void
+static void
 usage(void)
 {
 

Reply via email to