Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin static + __dead



details:   https://anonhg.NetBSD.org/src/rev/2e4f9c1620ca
branches:  trunk
changeset: 768822:2e4f9c1620ca
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Aug 27 18:44:44 2011 +0000

description:
static + __dead

diffstat:

 sbin/pppoectl/pppoectl.c |  46 +++++++++++++++++++++++-----------------------
 sbin/reboot/reboot.c     |  13 ++++++-------
 2 files changed, 29 insertions(+), 30 deletions(-)

diffs (136 lines):

diff -r 4f9f9c6cb2d8 -r 2e4f9c1620ca sbin/pppoectl/pppoectl.c
--- a/sbin/pppoectl/pppoectl.c  Sat Aug 27 18:43:24 2011 +0000
+++ b/sbin/pppoectl/pppoectl.c  Sat Aug 27 18:44:44 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $      */
+/*     $NetBSD: pppoectl.c,v 1.23 2011/08/27 18:44:44 joerg Exp $      */
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.23 2011/08/27 18:44:44 joerg Exp $");
 #endif
 
 
@@ -52,30 +52,30 @@
 #include <sysexits.h>
 #include <unistd.h>
 
-static void usage(void);
-static void print_error(const char *ifname, int error, const char * str);
+__dead static void usage(void);
+__dead static void print_error(const char *ifname, int error, const char * str);
 static void print_vals(const char *ifname, int phase, struct spppauthcfg *sp,
        int lcp_timeout, time_t idle_timeout, int authfailures, 
        int max_auth_failures, u_int maxalive, time_t max_noreceive);
-const char *phase_name(int phase);
-const char *proto_name(int proto);
-const char *authflags(int flags);
-static void pppoectl_argument(char *arg);
+static const char *phase_name(int phase);
+static const char *proto_name(int proto);
+static const char *authflags(int flags);
+static static void pppoectl_argument(char *arg);
 
-int hz = 0;
+static int hz = 0;
 
-int set_auth, set_lcp, set_idle_to, set_auth_failure, set_dns,
+static int set_auth, set_lcp, set_idle_to, set_auth_failure, set_dns,
     clear_auth_failure_count, set_keepalive;
-int maxalive = -1;
-int max_noreceive = -1;
-struct spppauthcfg spr;
-struct sppplcpcfg lcp;
-struct spppstatus status;
-struct spppidletimeout timeout;
-struct spppauthfailurestats authfailstats;
-struct spppauthfailuresettings authfailset;
-struct spppdnssettings dnssettings;
-struct spppkeepalivesettings keepalivesettings;
+static int maxalive = -1;
+static int max_noreceive = -1;
+static struct spppauthcfg spr;
+static struct sppplcpcfg lcp;
+static struct spppstatus status;
+static struct spppidletimeout timeout;
+static struct spppauthfailurestats authfailstats;
+static struct spppauthfailuresettings authfailset;
+static struct spppdnssettings dnssettings;
+static struct spppkeepalivesettings keepalivesettings;
 
 int
 main(int argc, char **argv)
@@ -571,7 +571,7 @@
 #endif
 }
 
-const char *
+static const char *
 phase_name(int phase)
 {
        switch (phase) {
@@ -584,7 +584,7 @@
        return "illegal";
 }
 
-const char *
+static const char *
 proto_name(int proto)
 {
        static char buf[12];
@@ -597,7 +597,7 @@
        return buf;
 }
 
-const char *
+static const char *
 authflags(int flags)
 {
        static char buf[32];
diff -r 4f9f9c6cb2d8 -r 2e4f9c1620ca sbin/reboot/reboot.c
--- a/sbin/reboot/reboot.c      Sat Aug 27 18:43:24 2011 +0000
+++ b/sbin/reboot/reboot.c      Sat Aug 27 18:44:44 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: reboot.c,v 1.38 2011/02/16 19:32:26 wiz Exp $  */
+/*     $NetBSD: reboot.c,v 1.39 2011/08/27 18:46:19 joerg Exp $        */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)reboot.c   8.1 (Berkeley) 6/5/93";
 #else
-__RCSID("$NetBSD: reboot.c,v 1.38 2011/02/16 19:32:26 wiz Exp $");
+__RCSID("$NetBSD: reboot.c,v 1.39 2011/08/27 18:46:19 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -57,11 +57,10 @@
 #include <unistd.h>
 #include <util.h>
 
-int main(int, char *[]);
-void usage(void);
+__dead static void usage(void);
 
-int dohalt;
-int dopoweroff;
+static int dohalt;
+static int dopoweroff;
 
 int
 main(int argc, char *argv[])
@@ -246,7 +245,7 @@
        /* NOTREACHED */
 }
 
-void
+static void
 usage(void)
 {
        const char *pflag = dohalt ? "p" : "";



Home | Main Index | Thread Index | Old Index