Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/15d2714dea67
branches:  trunk
changeset: 769047:15d2714dea67
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Aug 30 19:06:06 2011 +0000

description:
static + __dead

diffstat:

 usr.sbin/iostat/iostat.c         |  13 ++++++-------
 usr.sbin/irdaattach/irdaattach.c |   9 ++++-----
 2 files changed, 10 insertions(+), 12 deletions(-)

diffs (81 lines):

diff -r 0afb78e367bf -r 15d2714dea67 usr.sbin/iostat/iostat.c
--- a/usr.sbin/iostat/iostat.c  Tue Aug 30 19:05:12 2011 +0000
+++ b/usr.sbin/iostat/iostat.c  Tue Aug 30 19:06:06 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iostat.c,v 1.59 2011/02/14 02:43:37 enami Exp $        */
+/*     $NetBSD: iostat.c,v 1.60 2011/08/30 19:06:06 joerg Exp $        */
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -71,7 +71,7 @@
 #if 0
 static char sccsid[] = "@(#)iostat.c   8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: iostat.c,v 1.59 2011/02/14 02:43:37 enami Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.60 2011/08/30 19:06:06 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -94,7 +94,8 @@
 /* Namelist and memory files. */
 char   *nlistf, *memf;
 
-int            hz, reps, interval;
+int            hz;
+static int     reps, interval;
 static int     todo = 0;
 static int     defdrives;
 static int     winlines = 20;
@@ -118,12 +119,10 @@
 static void sig_header(int);
 static volatile int do_header;
 static void header(void);
-static void usage(void);
+__dead static void usage(void);
 static void display(void);
 static int selectdrives(int, char *[]);
 
-int main(int, char *[]);
-
 int
 main(int argc, char *argv[])
 {
@@ -248,7 +247,7 @@
 }
 
 static void
-header()
+header(void)
 {
        size_t i;
 
diff -r 0afb78e367bf -r 15d2714dea67 usr.sbin/irdaattach/irdaattach.c
--- a/usr.sbin/irdaattach/irdaattach.c  Tue Aug 30 19:05:12 2011 +0000
+++ b/usr.sbin/irdaattach/irdaattach.c  Tue Aug 30 19:06:06 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irdaattach.c,v 1.8 2009/04/16 02:11:44 lukem Exp $     */
+/*     $NetBSD: irdaattach.c,v 1.9 2011/08/30 19:07:07 joerg Exp $     */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -46,8 +46,7 @@
 #include <unistd.h>
 #include <util.h>
 
-int    main(int, char **);
-void   usage(void);
+__dead static void     usage(void);
 
 int
 main(int argc, char **argv)
@@ -157,8 +156,8 @@
                sigsuspend(&nsigset);
 }
 
-void
-usage()
+static void
+usage(void)
 {
 
        fprintf(stderr, "usage: %s [-d donglename] [-fhHlmnp] ttyname\n",



Home | Main Index | Thread Index | Old Index