From owner-svn-src-all@FreeBSD.ORG Mon Sep 28 07:42:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B49D106566C; Mon, 28 Sep 2009 07:42:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11BA28FC17; Mon, 28 Sep 2009 07:42:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8S7gqsH047027; Mon, 28 Sep 2009 07:42:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8S7gqu4047025; Mon, 28 Sep 2009 07:42:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200909280742.n8S7gqu4047025@svn.freebsd.org> From: Xin LI Date: Mon, 28 Sep 2009 07:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197560 - head/sbin/shutdown X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 07:42:53 -0000 Author: delphij Date: Mon Sep 28 07:42:52 2009 New Revision: 197560 URL: http://svn.freebsd.org/changeset/base/197560 Log: Static'ify internal methods and use prototype. Modified: head/sbin/shutdown/shutdown.c Modified: head/sbin/shutdown/shutdown.c ============================================================================== --- head/sbin/shutdown/shutdown.c Mon Sep 28 07:41:17 2009 (r197559) +++ head/sbin/shutdown/shutdown.c Mon Sep 28 07:42:52 2009 (r197560) @@ -92,15 +92,15 @@ static int dohalt, dopower, doreboot, ki static char mbuf[BUFSIZ]; static const char *nosync, *whom; -void badtime(void); -void die_you_gravy_sucking_pig_dog(void); -void finish(int); -void getoffset(char *); -void loop(void); -void nolog(void); -void timeout(int); -void timewarn(int); -void usage(const char *); +static void badtime(void); +static void die_you_gravy_sucking_pig_dog(void); +static void finish(int); +static void getoffset(char *); +static void loop(void); +static void nolog(void); +static void timeout(int); +static void timewarn(int); +static void usage(const char *); extern const char **environ; @@ -219,8 +219,8 @@ main(int argc, char **argv) return(0); } -void -loop() +static void +loop(void) { struct interval *tp; u_int sltime; @@ -268,7 +268,7 @@ static const char *restricted_environ[] NULL }; -void +static void timewarn(int timeleft) { static int first; @@ -318,13 +318,13 @@ timewarn(int timeleft) } } -void +static void timeout(int signo __unused) { longjmp(alarmbuf, 1); } -void +static void die_you_gravy_sucking_pig_dog() { char *empty_environ[] = { NULL }; @@ -385,7 +385,7 @@ die_you_gravy_sucking_pig_dog() #define ATOI2(p) (p[0] - '0') * 10 + (p[1] - '0'); p += 2; -void +static void getoffset(char *timearg) { struct tm *lt; @@ -468,8 +468,8 @@ getoffset(char *timearg) } #define NOMSG "\n\nNO LOGINS: System going down at " -void -nolog() +static void +nolog(void) { int logfd; char *ct; @@ -490,7 +490,7 @@ nolog() } } -void +static void finish(int signo __unused) { if (!killflg) @@ -498,13 +498,13 @@ finish(int signo __unused) exit(0); } -void +static void badtime() { errx(1, "bad time format"); } -void +static void usage(const char *cp) { if (cp != NULL)