From d91b7c2d0fac80c74a2783b84fdba5ae0b941b1c Mon Sep 17 00:00:00 2001 From: alfred Date: Tue, 28 May 2002 18:31:41 +0000 Subject: Assume __STDC__, remove non-__STDC__ code. Reviewed by: md5 --- libexec/bootpd/bootpd.c | 4 ---- libexec/bootpd/dovend.c | 4 ---- libexec/bootpd/dovend.h | 15 ++++----------- libexec/bootpd/dumptab.c | 4 ---- libexec/bootpd/getether.h | 5 +---- libexec/bootpd/getif.h | 5 +---- libexec/bootpd/hash.c | 4 ---- libexec/bootpd/hash.h | 9 +-------- libexec/bootpd/hwaddr.h | 4 ---- libexec/bootpd/lookup.h | 15 ++++----------- libexec/bootpd/readfile.c | 4 ---- libexec/bootpd/readfile.h | 20 ++++++-------------- libexec/bootpd/report.c | 17 ----------------- libexec/bootpd/report.h | 4 ---- 14 files changed, 17 insertions(+), 97 deletions(-) diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 03fce45..0cdb034 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -105,11 +105,7 @@ SOFTWARE. * Externals, forward declarations, and global variables */ -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif extern void dumptab P((char *)); diff --git a/libexec/bootpd/dovend.c b/libexec/bootpd/dovend.c index 279d59c..6ba36e8 100644 --- a/libexec/bootpd/dovend.c +++ b/libexec/bootpd/dovend.c @@ -29,11 +29,7 @@ #include "report.h" #include "dovend.h" -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif PRIVATE int insert_generic P((struct shared_bindata *, byte **, int *)); diff --git a/libexec/bootpd/dovend.h b/libexec/bootpd/dovend.h index b30c982..ef3b62d 100644 --- a/libexec/bootpd/dovend.h +++ b/libexec/bootpd/dovend.h @@ -1,13 +1,6 @@ /* dovend.h */ +/* $FreeBSD$ */ -#ifdef __STDC__ -#define P(args) args -#else -#define P(args) () -#endif - -extern int dovend_rfc1497 P((struct host *hp, u_char *buf, int len)); -extern int insert_ip P((int, struct in_addr_list *, u_char **, int *)); -extern void insert_u_long P((u_int32, u_char **)); - -#undef P +extern int dovend_rfc1497(struct host *hp, u_char *buf, int len); +extern int insert_ip(int, struct in_addr_list *, u_char **, int *); +extern void insert_u_long(u_int32, u_char **); diff --git a/libexec/bootpd/dumptab.c b/libexec/bootpd/dumptab.c index 0fe31b4..c88ee19 100644 --- a/libexec/bootpd/dumptab.c +++ b/libexec/bootpd/dumptab.c @@ -28,11 +28,7 @@ #include "patchlevel.h" #include "bootpd.h" -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif #ifdef DEBUG static void dump_generic P((FILE *, struct shared_bindata *)); diff --git a/libexec/bootpd/getether.h b/libexec/bootpd/getether.h index 2f98299..026df15 100644 --- a/libexec/bootpd/getether.h +++ b/libexec/bootpd/getether.h @@ -1,7 +1,4 @@ /* getether.h */ +/* $FreeBSD$ */ -#ifdef __STDC__ extern int getether(char *ifname, char *eaptr); -#else -extern int getether(); -#endif diff --git a/libexec/bootpd/getif.h b/libexec/bootpd/getif.h index c51dafd..a2c86cf 100644 --- a/libexec/bootpd/getif.h +++ b/libexec/bootpd/getif.h @@ -1,7 +1,4 @@ /* getif.h */ +/* $FreeBSD$ */ -#ifdef __STDC__ extern struct ifreq *getif(int, struct in_addr *); -#else -extern struct ifreq *getif(); -#endif diff --git a/libexec/bootpd/hash.c b/libexec/bootpd/hash.c index 16b0420..2a0b4e9 100644 --- a/libexec/bootpd/hash.c +++ b/libexec/bootpd/hash.c @@ -61,11 +61,7 @@ SOFTWARE. #define PRIVATE static #endif -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif PRIVATE void hashi_FreeMembers P((hash_member *, hash_freefp)); diff --git a/libexec/bootpd/hash.h b/libexec/bootpd/hash.h index 51d0a5e..8ef1d91 100644 --- a/libexec/bootpd/hash.h +++ b/libexec/bootpd/hash.h @@ -25,6 +25,7 @@ SOFTWARE. /* * Generalized hash table ADT + * $FreeBSD$ * * Provides multiple, dynamically-allocated, variable-sized hash tables on * various data and keys. @@ -93,11 +94,7 @@ SOFTWARE. /* * Define "hash_datum" as a universal data type */ -#ifdef __STDC__ typedef void hash_datum; -#else -typedef char hash_datum; -#endif typedef struct hash_memberstruct hash_member; typedef struct hash_tblstruct hash_tbl; @@ -120,11 +117,7 @@ struct hash_tblstruct { }; /* ANSI function prototypes or empty arg list? */ -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif typedef int (*hash_cmpfp) P((hash_datum *, hash_datum *)); typedef void (*hash_freefp) P((hash_datum *)); diff --git a/libexec/bootpd/hwaddr.h b/libexec/bootpd/hwaddr.h index 2004273..38bbdc8 100644 --- a/libexec/bootpd/hwaddr.h +++ b/libexec/bootpd/hwaddr.h @@ -22,11 +22,7 @@ struct hwinfo { extern struct hwinfo hwinfolist[]; extern int hwinfocnt; -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif extern void setarp P((int, struct in_addr *, int, u_char *, int)); extern char *haddrtoa P((u_char *, int)); diff --git a/libexec/bootpd/lookup.h b/libexec/bootpd/lookup.h index 04805d8..4940f05 100644 --- a/libexec/bootpd/lookup.h +++ b/libexec/bootpd/lookup.h @@ -1,15 +1,8 @@ /* lookup.h */ +/* $FreeBSD$ */ #include "bptypes.h" /* for int32, u_int32 */ -#ifdef __STDC__ -#define P(args) args -#else -#define P(args) () -#endif - -extern u_char *lookup_hwa P((char *hostname, int htype)); -extern int lookup_ipa P((char *hostname, u_int32 *addr)); -extern int lookup_netmask P((u_int32 addr, u_int32 *mask)); - -#undef P +extern u_char *lookup_hwa(char *hostname, int htype); +extern int lookup_ipa(char *hostname, u_int32 *addr); +extern int lookup_netmask(u_int32 addr, u_int32 *mask); diff --git a/libexec/bootpd/readfile.c b/libexec/bootpd/readfile.c index 78c5e23..04e552e 100644 --- a/libexec/bootpd/readfile.c +++ b/libexec/bootpd/readfile.c @@ -227,11 +227,7 @@ PRIVATE struct htypename htnamemap[] = { * Externals and forward declarations. */ -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif extern boolean iplookcmp(); boolean nmcmp P((hash_datum *, hash_datum *)); diff --git a/libexec/bootpd/readfile.h b/libexec/bootpd/readfile.h index 3913455..be9cada 100644 --- a/libexec/bootpd/readfile.h +++ b/libexec/bootpd/readfile.h @@ -1,19 +1,11 @@ /* readfile.h */ +/* $FreeBSD$ */ #include "bptypes.h" #include "hash.h" -#ifdef __STDC__ -#define P(args) args -#else -#define P(args) () -#endif - -extern boolean hwlookcmp P((hash_datum *, hash_datum *)); -extern boolean iplookcmp P((hash_datum *, hash_datum *)); -extern boolean nmcmp P((hash_datum *, hash_datum *)); -extern void readtab P((int)); -extern void rdtab_init P((void)); - -#undef P - +extern boolean hwlookcmp(hash_datum *, hash_datum *); +extern boolean iplookcmp(hash_datum *, hash_datum *); +extern boolean nmcmp(hash_datum *, hash_datum *); +extern void readtab(int); +extern void rdtab_init(void); diff --git a/libexec/bootpd/report.c b/libexec/bootpd/report.c index 191d545..290e19e 100644 --- a/libexec/bootpd/report.c +++ b/libexec/bootpd/report.c @@ -4,11 +4,7 @@ * report() - calls syslog */ -#ifdef __STDC__ #include -#else -#include -#endif #include #include @@ -92,17 +88,8 @@ static int numlevels = sizeof(levelnames) / sizeof(levelnames[0]); * Print a log message using syslog(3) and/or stderr. * The message passed in should not include a newline. */ -#ifdef __STDC__ void report(int priority, const char *fmt,...) -#else -/*VARARGS2*/ -void -report(priority, fmt, va_alist) - int priority; - const char *fmt; - va_dcl -#endif { va_list ap; static char buf[128]; @@ -110,11 +97,7 @@ report(priority, fmt, va_alist) if ((priority < 0) || (priority >= numlevels)) { priority = numlevels - 1; } -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); diff --git a/libexec/bootpd/report.h b/libexec/bootpd/report.h index 2b6f622..dbb1a66 100644 --- a/libexec/bootpd/report.h +++ b/libexec/bootpd/report.h @@ -1,11 +1,7 @@ /* report.h */ /* $FreeBSD$ */ -#ifdef __STDC__ #define P(args) args -#else -#define P(args) () -#endif extern void report_init P((int nolog)); extern void report P((int, const char *, ...)) __printflike(2, 3); -- cgit v1.1