summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomek Mrugalski <tomek@isc.org>2011-05-11 14:21:00 +0000
committerTomek Mrugalski <tomek@isc.org>2011-05-11 14:21:00 +0000
commit680a64e827815f6be8d5014c39f2f157a5c47061 (patch)
treeae44003c1b97a90d21fee14a1423326eccdde04e /common
parentb976768cfe7dc543fc743329495dc1cdd2a3b272 (diff)
downloadisc-dhcp-680a64e827815f6be8d5014c39f2f157a5c47061.tar.gz
Code cleanup: remove obsolete PROTO, KandR, INLINE and ANSI_DECL macros
[ISC-Bugs #13151]
Diffstat (limited to 'common')
-rw-r--r--common/conflex.c14
-rw-r--r--common/discover.c10
-rw-r--r--common/dispatch.c6
-rw-r--r--common/dlpi.c60
-rw-r--r--common/icmp.c3
-rw-r--r--common/print.c7
-rw-r--r--common/tr.c7
-rw-r--r--common/tree.c8
8 files changed, 57 insertions, 58 deletions
diff --git a/common/conflex.c b/common/conflex.c
index d5dd411d..1ec23281 100644
--- a/common/conflex.c
+++ b/common/conflex.c
@@ -3,7 +3,7 @@
Lexical scanner for dhcpd config file... */
/*
- * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -35,14 +35,14 @@
#include "dhcpd.h"
#include <ctype.h>
-static int get_char PROTO ((struct parse *));
+static int get_char (struct parse *);
static void unget_char(struct parse *, int);
-static void skip_to_eol PROTO ((struct parse *));
+static void skip_to_eol (struct parse *);
static enum dhcp_token read_whitespace(int c, struct parse *cfile);
-static enum dhcp_token read_string PROTO ((struct parse *));
-static enum dhcp_token read_number PROTO ((int, struct parse *));
-static enum dhcp_token read_num_or_name PROTO ((int, struct parse *));
-static enum dhcp_token intern PROTO ((char *, enum dhcp_token));
+static enum dhcp_token read_string (struct parse *);
+static enum dhcp_token read_number (int, struct parse *);
+static enum dhcp_token read_num_or_name (int, struct parse *);
+static enum dhcp_token intern (char *, enum dhcp_token);
isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp)
struct parse **cfile;
diff --git a/common/discover.c b/common/discover.c
index 23bc9e98..3cb8ec9e 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -3,7 +3,7 @@
Find and identify the network interfaces. */
/*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2009,2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -61,10 +61,10 @@ struct in_addr local_address;
struct in6_addr local_address6;
#endif /* DHCPv6 */
-void (*bootp_packet_handler) PROTO ((struct interface_info *,
- struct dhcp_packet *, unsigned,
- unsigned int,
- struct iaddr, struct hardware *));
+void (*bootp_packet_handler) (struct interface_info *,
+ struct dhcp_packet *, unsigned,
+ unsigned int,
+ struct iaddr, struct hardware *);
#ifdef DHCPv6
void (*dhcpv6_packet_handler)(struct interface_info *,
diff --git a/common/dispatch.c b/common/dispatch.c
index efb0dba3..7c4434e7 100644
--- a/common/dispatch.c
+++ b/common/dispatch.c
@@ -3,7 +3,7 @@
Network input dispatcher... */
/*
- * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -178,7 +178,7 @@ isclib_timer_callback(isc_task_t *taskp,
void add_timeout (when, where, what, ref, unref)
struct timeval *when;
- void (*where) PROTO ((void *));
+ void (*where) (void *);
void *what;
tvref_t ref;
tvunref_t unref;
@@ -352,7 +352,7 @@ void add_timeout (when, where, what, ref, unref)
}
void cancel_timeout (where, what)
- void (*where) PROTO ((void *));
+ void (*where) (void *);
void *what;
{
struct timeout *t, *q;
diff --git a/common/dlpi.c b/common/dlpi.c
index 4700cf51..8f2c73dc 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -125,7 +125,7 @@
# endif
#if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW)
-static int strioctl PROTO ((int fd, int cmd, int timeout, int len, char *dp));
+static int strioctl (int fd, int cmd, int timeout, int len, char *dp);
#endif
#define DLPI_MAXDLBUF 8192 /* Buffer size */
@@ -133,46 +133,44 @@ static int strioctl PROTO ((int fd, int cmd, int timeout, int len, char *dp));
#define DLPI_DEVDIR "/dev/" /* Device directory */
static int dlpiopen(const char *ifname);
-static int dlpiunit PROTO ((char *ifname));
-static int dlpiinforeq PROTO ((int fd));
-static int dlpiphysaddrreq PROTO ((int fd, unsigned long addrtype));
-static int dlpiattachreq PROTO ((int fd, unsigned long ppa));
-static int dlpibindreq PROTO ((int fd, unsigned long sap, unsigned long max_conind,
- unsigned long service_mode, unsigned long conn_mgmt,
- unsigned long xidtest));
+static int dlpiunit (char *ifname);
+static int dlpiinforeq (int fd);
+static int dlpiphysaddrreq (int fd, unsigned long addrtype);
+static int dlpiattachreq (int fd, unsigned long ppa);
+static int dlpibindreq (int fd, unsigned long sap, unsigned long max_conind,
+ unsigned long service_mode, unsigned long conn_mgmt,
+ unsigned long xidtest);
#if defined(UNUSED_DLPI_INTERFACE)
/* These functions are unused at present, but may be used at a later date.
* defined out to avoid compiler warnings about unused static functions.
*/
-static int dlpidetachreq PROTO ((int fd));
-static int dlpiunbindreq PROTO ((int fd));
+static int dlpidetachreq (int fd);
+static int dlpiunbindreq (int fd);
#endif
-static int dlpiokack PROTO ((int fd, char *bufp));
-static int dlpiinfoack PROTO ((int fd, char *bufp));
-static int dlpiphysaddrack PROTO ((int fd, char *bufp));
-static int dlpibindack PROTO ((int fd, char *bufp));
+static int dlpiokack (int fd, char *bufp);
+static int dlpiinfoack (int fd, char *bufp);
+static int dlpiphysaddrack (int fd, char *bufp);
+static int dlpibindack (int fd, char *bufp);
#if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
/* These functions are not used if we're only sourcing the get_hw_addr()
* function (for USE_SOCKETS).
*/
-static int dlpiunitdatareq PROTO ((int fd, unsigned char *addr,
- int addrlen, unsigned long minpri,
- unsigned long maxpri, unsigned char *data,
- int datalen));
-static int dlpiunitdataind PROTO ((int fd,
- unsigned char *dstaddr,
- unsigned long *dstaddrlen,
- unsigned char *srcaddr,
- unsigned long *srcaddrlen,
- unsigned long *grpaddr,
- unsigned char *data,
- int datalen));
+static int dlpiunitdatareq (int fd, unsigned char *addr, int addrlen,
+ unsigned long minpri, unsigned long maxpri,
+ unsigned char *data, int datalen);
+static int dlpiunitdataind (int fd,
+ unsigned char *dstaddr,
+ unsigned long *dstaddrlen,
+ unsigned char *srcaddr,
+ unsigned long *srcaddrlen,
+ unsigned long *grpaddr,
+ unsigned char *data,
+ int datalen);
#endif /* !USE_DLPI_HWADDR: USE_DLPI_SEND || USE_DLPI_RECEIVE */
-static int expected PROTO ((unsigned long prim, union DL_primitives *dlp,
- int msgflags));
-static int strgetmsg PROTO ((int fd, struct strbuf *ctlp,
- struct strbuf *datap, int *flagsp,
- char *caller));
+static int expected (unsigned long prim, union DL_primitives *dlp,
+ int msgflags);
+static int strgetmsg (int fd, struct strbuf *ctlp, struct strbuf *datap,
+ int *flagsp, char *caller);
/* Reinitializes the specified interface after an address change. This
is not required for packet-filter APIs. */
diff --git a/common/icmp.c b/common/icmp.c
index 5308b406..cf9a7459 100644
--- a/common/icmp.c
+++ b/common/icmp.c
@@ -4,6 +4,7 @@
responses. */
/*
+ * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
@@ -52,7 +53,7 @@ trace_type_t *trace_icmp_output;
void icmp_startup (routep, handler)
int routep;
- void (*handler) PROTO ((struct iaddr, u_int8_t *, int));
+ void (*handler) (struct iaddr, u_int8_t *, int);
{
struct protoent *proto;
int protocol = 1;
diff --git a/common/print.c b/common/print.c
index 005b7685..bb59ba3b 100644
--- a/common/print.c
+++ b/common/print.c
@@ -3,8 +3,8 @@
Turn data structures into printable text. */
/*
- * Copyright (c) 2004-2007,2009-2010
- * by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2011 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -521,8 +521,7 @@ char *print_dec_2 (val)
return vbuf;
}
-static unsigned print_subexpression PROTO ((struct expression *,
- char *, unsigned));
+static unsigned print_subexpression (struct expression *, char *, unsigned);
static unsigned print_subexpression (expr, buf, len)
struct expression *expr;
diff --git a/common/tr.c b/common/tr.c
index 06154b84..6e05faf7 100644
--- a/common/tr.c
+++ b/common/tr.c
@@ -4,6 +4,7 @@
Contributed in May of 1999 by Andrew Chittenden */
/*
+ * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
@@ -42,9 +43,9 @@
* source routing
*/
-static int insert_source_routing PROTO ((struct trh_hdr *trh, struct interface_info* interface));
-static void save_source_routing PROTO ((struct trh_hdr *trh, struct interface_info* interface));
-static void expire_routes PROTO ((void));
+static int insert_source_routing (struct trh_hdr *trh, struct interface_info* interface);
+static void save_source_routing (struct trh_hdr *trh, struct interface_info* interface);
+static void expire_routes (void);
/*
* As we keep a list of interesting routing information only, a singly
diff --git a/common/tree.c b/common/tree.c
index d09717d4..d09107b8 100644
--- a/common/tree.c
+++ b/common/tree.c
@@ -3,6 +3,7 @@
Routines for manipulating parse trees... */
/*
+ * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
@@ -43,12 +44,11 @@
struct binding_scope *global_scope;
-static int do_host_lookup PROTO ((struct data_string *,
- struct dns_host_entry *));
+static int do_host_lookup (struct data_string *, struct dns_host_entry *);
#define DS_SPRINTF_SIZE 128
-/*
+/*
* If we are using a data_string structure to hold a NUL-terminated
* ASCII string, this function can be used to append a printf-formatted
* string to the end of it. The data_string structure will be resized to
@@ -3342,7 +3342,7 @@ int is_compound_expression (expr)
expr -> op == expr_dns_transaction);
}
-static int op_val PROTO ((enum expr_op));
+static int op_val (enum expr_op);
static int op_val (op)
enum expr_op op;