static + __dead

This commit is contained in:
joerg 2011-08-27 18:44:44 +00:00
parent 3fedada239
commit eccb2789c7
2 changed files with 29 additions and 30 deletions

View File

@ -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 @@ __RCSID("$NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $");
#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 @@ print_vals(const char *ifname, int phase, struct spppauthcfg *sp, int lcp_timeou
#endif
}
const char *
static const char *
phase_name(int phase)
{
switch (phase) {
@ -584,7 +584,7 @@ phase_name(int phase)
return "illegal";
}
const char *
static const char *
proto_name(int proto)
{
static char buf[12];
@ -597,7 +597,7 @@ proto_name(int proto)
return buf;
}
const char *
static const char *
authflags(int flags)
{
static char buf[32];

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\
#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 @@ __RCSID("$NetBSD: reboot.c,v 1.38 2011/02/16 19:32:26 wiz Exp $");
#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 @@ restart:
/* NOTREACHED */
}
void
static void
usage(void)
{
const char *pflag = dohalt ? "p" : "";