diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-08-01 18:32:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-08-01 18:32:22 +0000 |
commit | b8631172620c3e1542ebc475dc4e228eec355f70 (patch) | |
tree | 471c491c8ce666455cf445cdf6447f459b4dba37 /usr.sbin | |
parent | c2c17c2534be6163840ba4a11d5767f722f8c0a2 (diff) |
ansi cleanup; khalek@linuxgamers.net
Diffstat (limited to 'usr.sbin')
31 files changed, 353 insertions, 658 deletions
diff --git a/usr.sbin/eeprom/eehandlers.c b/usr.sbin/eeprom/eehandlers.c index fd97f2947eb..e304092c0e4 100644 --- a/usr.sbin/eeprom/eehandlers.c +++ b/usr.sbin/eeprom/eehandlers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eehandlers.c,v 1.11 2004/07/09 16:22:02 deraadt Exp $ */ +/* $OpenBSD: eehandlers.c,v 1.12 2004/08/01 18:32:17 deraadt Exp $ */ /* $NetBSD: eehandlers.c,v 1.2 1996/02/28 01:13:22 thorpej Exp $ */ /*- @@ -657,9 +657,7 @@ ee_verifychecksums(void) } u_char -ee_checksum(area, len) - u_char *area; - size_t len; +ee_checksum(u_char *area, size_t len) { u_char sum = 0; diff --git a/usr.sbin/eeprom/getdate.y b/usr.sbin/eeprom/getdate.y index 7ac3884f78e..8a361ed48be 100644 --- a/usr.sbin/eeprom/getdate.y +++ b/usr.sbin/eeprom/getdate.y @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: getdate.y,v 1.5 2003/06/11 23:33:28 deraadt Exp $ */ +/* $OpenBSD: getdate.y,v 1.6 2004/08/01 18:32:18 deraadt Exp $ */ /* ** Originally written by Steven M. Bellovin <smb@research.att.com> while @@ -489,19 +489,14 @@ static TABLE const MilitaryTable[] = { /* ARGSUSED */ static int -yyerror(s) - char *s; +yyerror(char *s) { return 0; } static time_t -ToSeconds(Hours, Minutes, Seconds, Meridian) - time_t Hours; - time_t Minutes; - time_t Seconds; - MERIDIAN Meridian; +ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian) { if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59) return -1; @@ -534,15 +529,8 @@ ToSeconds(Hours, Minutes, Seconds, Meridian) * A number from 0 to 99, which means a year from 1900 to 1999, or * The actual year (>=100). */ static time_t -Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode) - time_t Month; - time_t Day; - time_t Year; - time_t Hours; - time_t Minutes; - time_t Seconds; - MERIDIAN Meridian; - DSTMODE DSTmode; +Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, + time_t Seconds, MERIDIAN Meridian, DSTMODE DSTmode) { static int DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 @@ -587,9 +575,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode) static time_t -DSTcorrect(Start, Future) - time_t Start; - time_t Future; +DSTcorrect(time_t Start, time_t Future) { time_t StartDay; time_t FutureDay; @@ -601,10 +587,7 @@ DSTcorrect(Start, Future) static time_t -RelativeDate(Start, DayOrdinal, DayNumber) - time_t Start; - time_t DayOrdinal; - time_t DayNumber; +RelativeDate(time_t Start, time_t DayOrdinal, time_t DayNumber) { struct tm *tm; time_t now; @@ -618,9 +601,7 @@ RelativeDate(Start, DayOrdinal, DayNumber) static time_t -RelativeMonth(Start, RelMonth) - time_t Start; - time_t RelMonth; +RelativeMonth(time_t Start, time_t RelMonth) { struct tm *tm; time_t Month; @@ -640,8 +621,7 @@ RelativeMonth(Start, RelMonth) static int -LookupWord(buff) - char *buff; +LookupWord(char *buff) { char *p; char *q; @@ -747,7 +727,7 @@ LookupWord(buff) static int -yylex() +yylex(void) { char c; char *p; @@ -802,8 +782,7 @@ yylex() /* Yield A - B, measured in seconds. */ static long -difftm (a, b) - struct tm *a, *b; +difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); @@ -823,9 +802,7 @@ difftm (a, b) } time_t -get_date(p, now) - char *p; - struct timeb *now; +get_date(char *p, struct timeb *now) { struct tm *tm, gmt; struct timeb ftz; diff --git a/usr.sbin/hilinfo/hilinfo.c b/usr.sbin/hilinfo/hilinfo.c index 073caa83056..2b064564f5c 100644 --- a/usr.sbin/hilinfo/hilinfo.c +++ b/usr.sbin/hilinfo/hilinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hilinfo.c,v 1.5 2004/07/09 16:22:02 deraadt Exp $ */ +/* $OpenBSD: hilinfo.c,v 1.6 2004/08/01 18:32:18 deraadt Exp $ */ /* * Copyright (c) 1987-1993, The University of Utah and * the Center for Software Science at the University of Utah (CSS). @@ -52,8 +52,7 @@ struct hil_info { }; int -main(argc, argv) - char **argv; +main(int argc, char *argv[]) { int aflg, tflg; int c; @@ -96,8 +95,7 @@ main(argc, argv) } int -getinfo(dname) - char *dname; +getinfo(char *dname) { int f; diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 9b4086ce499..36a23ace2ea 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.19 2004/02/15 02:45:47 tedu Exp $ */ +/* $OpenBSD: iostat.c,v 1.20 2004/08/01 18:32:19 deraadt Exp $ */ /* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */ /* @@ -202,8 +202,7 @@ main(int argc, char *argv[]) } static void -sigheader(signo) - int signo; +sigheader(int signo) { wantheader = 1; } @@ -254,8 +253,7 @@ header(void) } static void -disk_stats(etime) -double etime; +disk_stats(double etime) { int dn; double atime, mbps; @@ -291,8 +289,7 @@ double etime; } static void -disk_stats2(etime) -double etime; +disk_stats2(double etime) { int dn; double atime; @@ -317,7 +314,7 @@ double etime; } static void -cpustats() +cpustats(void) { int state; double time; @@ -333,7 +330,7 @@ cpustats() } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: iostat [-CdDIT] [-c count] [-M core] [-N system] [-w wait] [drives]\n"); @@ -341,7 +338,7 @@ usage() } static void -display() +display(void) { int i; double etime; @@ -379,9 +376,7 @@ display() } static void -selectdrives(argc, argv) -int argc; -char *argv[]; +selectdrives(int argc, char *argv[]) { int i, ndrives; diff --git a/usr.sbin/kgmon/kgmon.c b/usr.sbin/kgmon/kgmon.c index 8c2a9b8e0ce..6e93cb96cd3 100644 --- a/usr.sbin/kgmon/kgmon.c +++ b/usr.sbin/kgmon/kgmon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kgmon.c,v 1.10 2003/06/02 23:36:53 millert Exp $ */ +/* $OpenBSD: kgmon.c,v 1.11 2004/08/01 18:32:19 deraadt Exp $ */ /* * Copyright (c) 1983, 1992, 1993 @@ -37,7 +37,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)kgmon.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: kgmon.c,v 1.10 2003/06/02 23:36:53 millert Exp $"; +static char *rcsid = "$OpenBSD: kgmon.c,v 1.11 2004/08/01 18:32:19 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -163,10 +163,7 @@ main(int argc, char **argv) * Check that profiling is enabled and open any ncessary files. */ int -openfiles(system, kmemf, kvp) - char *system; - char *kmemf; - struct kvmvars *kvp; +openfiles(char *system, char *kmemf, struct kvmvars *kvp) { int mib[3], state, openmode; size_t size; @@ -212,8 +209,7 @@ openfiles(system, kmemf, kvp) * Suppress options that require a writable kernel. */ void -kern_readonly(mode) - int mode; +kern_readonly(int mode) { extern char *__progname; @@ -233,8 +229,7 @@ kern_readonly(mode) * Get the state of kernel profiling. */ int -getprof(kvp) - struct kvmvars *kvp; +getprof(struct kvmvars *kvp) { int mib[3]; size_t size; @@ -260,9 +255,7 @@ getprof(kvp) * Enable or disable kernel profiling according to the state variable. */ void -setprof(kvp, state) - struct kvmvars *kvp; - int state; +setprof(struct kvmvars *kvp, int state) { struct gmonparam *p = (struct gmonparam *)nl[N_GMONPARAM].n_value; int mib[3], oldstate; @@ -295,8 +288,7 @@ bad: * Build the gmon.out file. */ void -dumpstate(kvp) - struct kvmvars *kvp; +dumpstate(struct kvmvars *kvp) { FILE *fp; struct rawarc rawarc; @@ -410,8 +402,7 @@ dumpstate(kvp) * Get the profiling rate. */ int -getprofhz(kvp) - struct kvmvars *kvp; +getprofhz(struct kvmvars *kvp) { int mib[2], profrate; size_t size; @@ -437,8 +428,7 @@ getprofhz(kvp) * Reset the kernel profiling date structures. */ void -reset(kvp) - struct kvmvars *kvp; +reset(struct kvmvars *kvp) { char *zbuf; u_long biggest; diff --git a/usr.sbin/map-mbone/mapper.c b/usr.sbin/map-mbone/mapper.c index 4135b58d96a..c191d51916c 100644 --- a/usr.sbin/map-mbone/mapper.c +++ b/usr.sbin/map-mbone/mapper.c @@ -1,3 +1,4 @@ +/* $OpenBSD: mapper.c,v 1.16 2004/08/01 18:32:19 deraadt Exp $ */ /* $NetBSD: mapper.c,v 1.3 1995/12/10 11:12:04 mycroft Exp $ */ /* Mapper for connections between MRouteD multicast routers. @@ -102,9 +103,7 @@ int get_number(int *var, int deflt, char ***pargv, u_int32_t host_addr(char *name); -Node *find_node(addr, ptr) - u_int32_t addr; - Node **ptr; +Node *find_node(u_int32_t addr, Node **ptr) { Node *n = *ptr; @@ -125,9 +124,7 @@ Node *find_node(addr, ptr) } -Interface *find_interface(addr, node) - u_int32_t addr; - Node *node; +Interface *find_interface(u_int32_t addr, Node *node) { Interface *ifc; @@ -145,9 +142,7 @@ Interface *find_interface(addr, node) } -Neighbor *find_neighbor(addr, node) - u_int32_t addr; - Node *node; +Neighbor *find_neighbor(u_int32_t addr, Node *node) { Interface *ifc; @@ -202,15 +197,13 @@ logit(int severity, int syserr, char *format, ...) /* * Send a neighbors-list request. */ -void ask(dst) - u_int32_t dst; +void ask(u_int32_t dst) { send_igmp(our_addr, dst, IGMP_DVMRP, DVMRP_ASK_NEIGHBORS, htonl(MROUTED_LEVEL), 0); } -void ask2(dst) - u_int32_t dst; +void ask2(u_int32_t dst) { send_igmp(our_addr, dst, IGMP_DVMRP, DVMRP_ASK_NEIGHBORS2, htonl(MROUTED_LEVEL), 0); @@ -220,9 +213,8 @@ void ask2(dst) /* * Process an incoming group membership report. */ -void accept_group_report(src, dst, group, r_type) - u_int32_t src, dst, group; - int r_type; +void accept_group_report(u_int32_t src, u_int32_t dst, u_int32_t group, + int r_type) { logit(LOG_INFO, 0, "ignoring IGMP group membership report from %s to %s", inet_fmt(src, s1), inet_fmt(dst, s2)); @@ -232,10 +224,8 @@ void accept_group_report(src, dst, group, r_type) /* * Process an incoming neighbor probe message. */ -void accept_probe(src, dst, p, datalen, level) - u_int32_t src, dst, level; - char *p; - int datalen; +void accept_probe(u_int32_t src, u_int32_t dst, char *p, int datalen, + u_int32_t level) { logit(LOG_INFO, 0, "ignoring DVMRP probe from %s to %s", inet_fmt(src, s1), inet_fmt(dst, s2)); @@ -245,10 +235,8 @@ void accept_probe(src, dst, p, datalen, level) /* * Process an incoming route report message. */ -void accept_report(src, dst, p, datalen, level) - u_int32_t src, dst, level; - char *p; - int datalen; +void accept_report(u_int32_t src, u_int32_t dst, char *p, int datalen, + u_int32_t level) { logit(LOG_INFO, 0, "ignoring DVMRP routing report from %s to %s", inet_fmt(src, s1), inet_fmt(dst, s2)); @@ -258,8 +246,7 @@ void accept_report(src, dst, p, datalen, level) /* * Process an incoming neighbor-list request message. */ -void accept_neighbor_request(src, dst) - u_int32_t src, dst; +void accept_neighbor_request(u_int32_t src, u_int32_t dst) { if (src != our_addr) logit(LOG_INFO, 0, @@ -267,8 +254,7 @@ void accept_neighbor_request(src, dst) inet_fmt(src, s1), inet_fmt(dst, s2)); } -void accept_neighbor_request2(src, dst) - u_int32_t src, dst; +void accept_neighbor_request2(u_int32_t src, u_int32_t dst) { if (src != our_addr) logit(LOG_INFO, 0, @@ -280,10 +266,8 @@ void accept_neighbor_request2(src, dst) /* * Process an incoming neighbor-list message. */ -void accept_neighbors(src, dst, p, datalen, level) - u_int32_t src, dst, level; - u_char *p; - int datalen; +void accept_neighbors(u_int32_t src, u_int32_t dst, u_char *p, int datalen, + u_int32_t level) { Node *node = find_node(src, &routers); @@ -441,10 +425,8 @@ void accept_neighbors(src, dst, p, datalen, level) } } -void accept_neighbors2(src, dst, p, datalen, level) - u_int32_t src, dst, level; - u_char *p; - int datalen; +void accept_neighbors2(u_int32_t src, u_int32_t dst, u_char *p, int datalen, + u_int32_t level) { Node *node = find_node(src, &routers); u_int broken_cisco = ((level & 0xffff) == 0x020a); /* 10.2 */ @@ -588,14 +570,13 @@ void accept_neighbors2(src, dst, p, datalen, level) } -void check_vif_state() +void check_vif_state(void) { logit(LOG_NOTICE, 0, "network marked down..."); } -int retry_requests(node) - Node *node; +int retry_requests(Node *node) { int result; @@ -615,8 +596,7 @@ int retry_requests(node) } -char *inet_name(addr) - u_int32_t addr; +char *inet_name(u_int32_t addr) { struct hostent *e; @@ -626,8 +606,7 @@ char *inet_name(addr) } -void print_map(node) - Node *node; +void print_map(Node *node) { if (node) { char *name, *addr; @@ -694,10 +673,7 @@ void print_map(node) } -char *graph_name(addr, buf, len) - u_int32_t addr; - char *buf; - size_t len; +char *graph_name(u_int32_t addr, char *buf, size_t len) { char *name; @@ -710,8 +686,7 @@ char *graph_name(addr, buf, len) } -void graph_edges(node) - Node *node; +void graph_edges(Node *node) { Interface *ifc; Neighbor *nb; @@ -755,8 +730,7 @@ void graph_edges(node) } } -void elide_aliases(node) - Node *node; +void elide_aliases(Node *node) { if (node) { elide_aliases(node->left); @@ -778,7 +752,7 @@ void elide_aliases(node) } } -void graph_map() +void graph_map(void) { time_t now = time(0); char *nowstr = ctime(&now); @@ -792,9 +766,7 @@ void graph_map() } -int get_number(var, deflt, pargv, pargc) - int *var, *pargc, deflt; - char ***pargv; +int get_number(int *var, int deflt, char ***pargv, int *pargc) { if ((*pargv)[0][2] == '\0') { /* Get the value from the next argument */ if (*pargc > 1 && isdigit((*pargv)[1][0])) { @@ -817,8 +789,7 @@ int get_number(var, deflt, pargv, pargc) } -u_int32_t host_addr(name) - char *name; +u_int32_t host_addr(char *name) { struct hostent *e = gethostbyname(name); int addr; @@ -835,9 +806,7 @@ u_int32_t host_addr(name) } -int main(argc, argv) - int argc; - char *argv[]; +int main(int argc, char *argv[]) { int flood = FALSE, graph = FALSE; @@ -977,53 +946,40 @@ int main(argc, argv) } /* dummies */ -void accept_prune(src, dst, p, datalen) - u_int32_t src, dst; - char *p; - int datalen; +void accept_prune(u_int32_t src, u_int32_t dst, char *p, int datalen) { } -void accept_graft(src, dst, p, datalen) - u_int32_t src, dst; - char *p; - int datalen; + +void accept_graft(u_int32_t src, u_int32_t dst, char *p, int datalen) { } -void accept_g_ack(src, dst, p, datalen) - u_int32_t src, dst; - char *p; - int datalen; + +void accept_g_ack(u_int32_t src, u_int32_t dst, char *p, int datalen) { } -void add_table_entry(origin, mcastgrp) - u_int32_t origin, mcastgrp; + +void add_table_entry(u_int32_t origin, u_int32_t mcastgrp) { } -void accept_leave_message(src, dst, group) - u_int32_t src, dst, group; + +void accept_leave_message(u_int32_t src, u_int32_t dst, u_int32_t group) { } -void accept_mtrace(src, dst, group, data, no, datalen) - u_int32_t src, dst, group; - char *data; - u_int no; - int datalen; + +void accept_mtrace(u_int32_t src, u_int32_t dst, u_int32_t group, char *data, + u_int no, int datalen) { } -void accept_membership_query(src, dst, group, tmo) - u_int32_t src, dst, group; - int tmo; + +void accept_membership_query(u_int32_t src, u_int32_t dst, u_int32_t group, + int tmo) { } -void accept_info_request(src, dst, p, datalen) - u_int32_t src, dst; - u_char *p; - int datalen; + +void accept_info_request(u_int32_t src, u_int32_t dst, u_char *p, int datalen) { } -void accept_info_reply(src, dst, p, datalen) - u_int32_t src, dst; - u_char *p; - int datalen; + +void accept_info_reply(u_int32_t src, u_int32_t dst, u_char *p, int datalen) { } diff --git a/usr.sbin/mrouted/rsrr.c b/usr.sbin/mrouted/rsrr.c index a8cca19e894..5e98d055d66 100644 --- a/usr.sbin/mrouted/rsrr.c +++ b/usr.sbin/mrouted/rsrr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: rsrr.c,v 1.10 2004/08/01 18:32:19 deraadt Exp $ */ /* $NetBSD: rsrr.c,v 1.3 1995/12/10 10:07:14 mycroft Exp $ */ /* @@ -83,7 +84,7 @@ static void rsrr_cache(struct gtable *gt, struct rsrr_rq *route_query); /* Initialize RSRR socket */ void -rsrr_init() +rsrr_init(void) { int servlen; struct sockaddr_un serv_addr; @@ -112,9 +113,7 @@ rsrr_init() /* Read a message from the RSRR socket */ void -rsrr_read(f, rfd) - int f; - fd_set *rfd; +rsrr_read(int f, fd_set *rfd) { int rsrr_recvlen; sigset_t mask, omask; @@ -139,8 +138,7 @@ rsrr_read(f, rfd) * appropriate action. */ static void -rsrr_accept(recvlen) - int recvlen; +rsrr_accept(int recvlen) { struct rsrr_header *rsrr; struct rsrr_rq *route_query; @@ -205,7 +203,7 @@ rsrr_accept(recvlen) /* Send an Initial Reply to the reservation protocol. */ static void -rsrr_accept_iq() +rsrr_accept_iq(void) { struct rsrr_header *rsrr; struct rsrr_vif *vif_list; @@ -257,10 +255,7 @@ rsrr_accept_iq() * change notification. */ static int -rsrr_accept_rq(route_query,flags,gt_notify) - struct rsrr_rq *route_query; - int flags; - struct gtable *gt_notify; +rsrr_accept_rq(struct rsrr_rq *route_query, int flags, struct gtable *gt_notify) { struct rsrr_header *rsrr; struct rsrr_rr *route_reply; @@ -377,8 +372,7 @@ rsrr_accept_rq(route_query,flags,gt_notify) /* Send an RSRR message. */ static int -rsrr_send(sendlen) - int sendlen; +rsrr_send(int sendlen) { int error; @@ -400,9 +394,7 @@ rsrr_send(sendlen) * caching Route Reply messages for route change notification. */ static void -rsrr_cache(gt,route_query) - struct gtable *gt; - struct rsrr_rq *route_query; +rsrr_cache(struct gtable *gt, struct rsrr_rq *route_query) { struct rsrr_cache *rc, **rcnp; struct rsrr_header *rsrr; @@ -457,9 +449,7 @@ rsrr_cache(gt,route_query) * all the cached Route Reply messages for route change notification. */ void -rsrr_cache_send(gt,notify) - struct gtable *gt; - int notify; +rsrr_cache_send(struct gtable *gt, int notify) { struct rsrr_cache *rc, **rcnp; int flags = 0; @@ -483,8 +473,7 @@ rsrr_cache_send(gt,notify) /* Clean the cache by deleting all entries. */ void -rsrr_cache_clean(gt) - struct gtable *gt; +rsrr_cache_clean(struct gtable *gt) { struct rsrr_cache *rc,*rc_next; @@ -499,7 +488,7 @@ rsrr_cache_clean(gt) } void -rsrr_clean() +rsrr_clean(void) { unlink(RSRR_SERV_PATH); } diff --git a/usr.sbin/mrouted/snmp.c b/usr.sbin/mrouted/snmp.c index f3b5a265540..8f1de69031e 100644 --- a/usr.sbin/mrouted/snmp.c +++ b/usr.sbin/mrouted/snmp.c @@ -56,8 +56,7 @@ static struct addrCache addrCache[10]; * Initialize the SNMP part of mrouted */ int /* returns: 0 on success, true on error */ -snmp_init(dest_port) - in_port_t dest_port; +snmp_init(in_port_t dest_port) { u_long myaddr; int ret; @@ -144,10 +143,7 @@ snmp_init(dest_port) * Place an IP address into an OID starting at element n */ void -put_address(name, addr, n) - oid *name; - u_long addr; - int n; +put_address(oid *name, u_long addr, int n) { int i; @@ -159,11 +155,7 @@ put_address(name, addr, n) /* Get an IP address from an OID starting at element n */ int -get_address(name, length, addr, n) - oid *name; - int length; - u_long *addr; - int n; +get_address(oid *name, int length, u_long *addr, int n) { int i; int ok = 1; @@ -185,15 +177,16 @@ get_address(name, length, addr, n) /* * Implements scalar objects from DVMRP and Multicast MIBs + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_scalar(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_scalar(register struct variable *vp, register oid *name, register int *length, + int exact, int *var_len, int (**write_method)() ) { int result; @@ -236,10 +229,7 @@ o_scalar(vp, name, length, exact, var_len, write_method) * Find if a specific scoped boundary exists on a Vif */ struct vif_acl * -find_boundary(vifi, addr, mask) - vifi_t vifi; - u_long addr; - u_long mask; +find_boundary(vifi_t vifi, u_long addr, u_long mask) { struct vif_acl *n; @@ -254,10 +244,7 @@ find_boundary(vifi, addr, mask) * Find the lowest boundary >= (V,A,M) spec */ struct vif_acl * -next_boundary(vifi, addr, mask) - vifi_t *vifi; - u_long addr; - u_long mask; +next_boundary(vifi_t *vifi, u_long addr, u_long mask) { struct vif_acl *bestn, *n; int i; @@ -281,15 +268,16 @@ next_boundary(vifi, addr, mask) /* * Implements the Boundary Table portion of the DVMRP MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_dvmrpBoundaryTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_dvmrpBoundaryTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { vifi_t vifi; u_long addr, mask; @@ -373,9 +361,7 @@ o_dvmrpBoundaryTable(vp, name, length, exact, var_len, write_method) * Find the lowest neighbor >= (V,A) spec */ struct listaddr * -next_neighbor(vifi, addr) - vifi_t *vifi; - u_long addr; +next_neighbor(vifi_t *vifi, u_long addr) { struct listaddr *bestn, *n; int i; @@ -399,9 +385,7 @@ next_neighbor(vifi, addr) * Find a neighbor, if it exists off a given Vif */ struct listaddr * -find_neighbor(vifi, addr) - vifi_t vifi; - u_long addr; +find_neighbor(vifi_t vifi, u_long addr) { struct listaddr *n; @@ -412,14 +396,17 @@ find_neighbor(vifi, addr) return NULL; } +/* + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 + */ u_char * -o_dvmrpNeighborTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_dvmrpNeighborTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { vifi_t vifi; u_long addr, mask; @@ -516,9 +503,7 @@ o_dvmrpNeighborTable(vp, name, length, exact, var_len, write_method) /* Look up ifIndex given uvifs[ifnum].uv_lcl_addr */ struct in_ifaddr * /* returns: in_ifaddr structure, or null on error */ -ipaddr_to_ifindex(ipaddr, ifIndex) - u_long ipaddr; - int *ifIndex; +ipaddr_to_ifindex(u_long ipaddr, int *ifIndex) { int interface; static struct in_ifaddr in_ifaddr; @@ -540,9 +525,7 @@ static struct in_ifaddr in_ifaddr; * Find if a specific scoped boundary exists on a Vif */ struct listaddr * -find_cache(grp, vifi) - u_long grp; - vifi_t vifi; +find_cache(u_long grp, vifi_t vifi) { struct listaddr *n; @@ -557,9 +540,7 @@ find_cache(grp, vifi) * Find the next group cache entry >= (A,V) spec */ struct listaddr * -next_cache(addr, vifi) - u_long addr; - vifi_t *vifi; +next_cache(u_long addr, vifi_t *vifi) { struct listaddr *bestn=NULL, *n; int i, besti; @@ -585,15 +566,16 @@ next_cache(addr, vifi) /* * Implements the IGMP Cache Table portion of the IGMP MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_igmpCacheTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_igmpCacheTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { vifi_t vifi; u_long grp; @@ -705,15 +687,16 @@ o_igmpCacheTable(vp, name, length, exact, var_len, write_method) /* * Implements the IGMP Interface Table portion of the IGMP MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_igmpInterfaceTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_igmpInterfaceTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { oid newname[MAX_NAME_LEN]; register int ifnum; @@ -761,9 +744,7 @@ static struct sioc_vif_req v_req; * Given a virtual interface number, make sure we have the current * kernel information for that Vif. */ -refresh_vif(v_req, ifnum) - struct sioc_vif_req *v_req; - int ifnum; +refresh_vif(struct sioc_vif_req *v_req, int ifnum) { static int lastq = -1; @@ -777,15 +758,16 @@ refresh_vif(v_req, ifnum) /* * Implements the Multicast Routing Interface Table portion of the Multicast MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_ipMRouteInterfaceTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_ipMRouteInterfaceTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { oid newname[MAX_NAME_LEN]; register int ifnum; @@ -885,15 +867,16 @@ static struct sioc_vif_req v_req; /* * Implements the DVMRP Route Table portion of the DVMRP MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_dvmrpRouteTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_dvmrpRouteTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { u_long src, mask; oid newname[MAX_NAME_LEN]; @@ -978,15 +961,16 @@ o_dvmrpRouteTable(vp, name, length, exact, var_len, write_method) /* * Implements the DVMRP Routing Next Hop Table portion of the DVMRP MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_dvmrpRouteNextHopTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_dvmrpRouteNextHopTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { u_long src, mask; vifi_t vifi; @@ -1062,15 +1046,16 @@ o_dvmrpRouteNextHopTable(vp, name, length, exact, var_len, write_method) /* * Implements the IP Multicast Route Table portion of the Multicast MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_ipMRouteTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_ipMRouteTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { u_long src, grp, mask; struct gtable *gt = NULL; @@ -1181,15 +1166,16 @@ static struct sioc_sg_req sg_req; /* * Implements the IP Multicast Routing Next Hop Table portion of the Multicast * MIB + * vp : IN - pointer to variable entry that points here + * name : IN/OUT - input name requested, output name found + * length : IN/OUT - length of input and output oid's + * exact : IN - TRUE if an exact match was requested. + * var_len : OUT - length of variable or 0 if function returned. + * write_method: OUT - pointer to function to set variable, otherwise 0 */ u_char * -o_ipMRouteNextHopTable(vp, name, length, exact, var_len, write_method) - register struct variable *vp; /* IN - pointer to variable entry that points here */ - register oid *name; /* IN/OUT - input name requested, output name found */ - register int *length; /* IN/OUT - length of input and output oid's */ - int exact; /* IN - TRUE if an exact match was requested. */ - int *var_len; /* OUT - length of variable or 0 if function returned. */ - int (**write_method)(); /* OUT - pointer to function to set variable, otherwise 0 */ +o_ipMRouteNextHopTable(register struct variable *vp, register oid *name, + register int *length, int exact, int *var_len, int (**write_method)()) { u_long src, grp, mask, addr; vifi_t vifi; @@ -1304,13 +1290,13 @@ o_ipMRouteNextHopTable(vp, name, length, exact, var_len, write_method) static time_t lasttimer; void -sync_timer() +sync_timer(void) { time(&lasttimer); } int /* in range [-TIMER_INTERVAL..0] */ -secs_remaining_offset() +secs_remaining_offset(void) { time_t tm; diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c index c07e1bfce92..47aadbfecad 100644 --- a/usr.sbin/mtrace/mtrace.c +++ b/usr.sbin/mtrace/mtrace.c @@ -1,3 +1,4 @@ +/* $OpenBSD: mtrace.c,v 1.24 2004/08/01 18:32:20 deraadt Exp $ */ /* $NetBSD: mtrace.c,v 1.5 1995/12/10 10:57:15 mycroft Exp $ */ /* @@ -52,7 +53,7 @@ #ifndef lint static char rcsid[] = - "@(#) $Id: mtrace.c,v 1.23 2004/03/16 01:11:09 tedu Exp $"; + "@(#) $Id: mtrace.c,v 1.24 2004/08/01 18:32:20 deraadt Exp $"; #endif #include <netdb.h> @@ -164,8 +165,7 @@ int main(int argc, char *argv[]); char * -inet_name(addr) - u_int32_t addr; +inet_name(u_int32_t addr) { struct hostent *e; @@ -176,8 +176,7 @@ inet_name(addr) u_int32_t -host_addr(name) - char *name; +host_addr(char *name) { struct hostent *e = (struct hostent *)0; u_int32_t addr; @@ -216,8 +215,7 @@ host_addr(name) char * -proto_type(type) - u_int type; +proto_type(u_int type) { static char buf[80]; @@ -238,8 +236,7 @@ proto_type(type) char * -flag_type(type) - u_int type; +flag_type(u_int type) { static char buf[80]; @@ -277,9 +274,7 @@ flag_type(type) */ u_int32_t -get_netmask(s, dst) - int s; - u_int32_t dst; +get_netmask(int s, u_int32_t dst) { u_int32_t if_addr, if_mask; u_int32_t retval = 0xFFFFFFFF; @@ -313,8 +308,7 @@ get_netmask(s, dst) int -get_ttl(buf) - struct resp_buf *buf; +get_ttl(struct resp_buf *buf) { int rno; struct tr_resp *b; @@ -341,8 +335,7 @@ get_ttl(buf) * the result in milliseconds. */ int -t_diff(a, b) - u_long a, b; +t_diff(u_long a, u_long b) { int d = a - b; @@ -355,8 +348,7 @@ t_diff(a, b) * so correct and incorrect times will be far apart. */ u_long -fixtime(time) - u_long time; +fixtime(u_long time) { if (abs((int)(time-base.qtime)) > 0x3FFFFFFF) time = ((time & 0xFFFF0000) + (JAN_1970 << 16)) + @@ -368,18 +360,14 @@ fixtime(time) * Swap bytes for poor little-endian machines that don't byte-swap */ u_long -byteswap(v) - u_long v; +byteswap(u_long v) { return ((v << 24) | ((v & 0xff00) << 8) | ((v >> 8) & 0xff00) | (v >> 24)); } int -send_recv(dst, type, code, tries, save) - u_int32_t dst; - int type, code, tries; - struct resp_buf *save; +send_recv(u_int32_t dst, int type, int code, int tries, struct resp_buf *save) { struct timeval tq, tr, tv; struct ip *ip; @@ -720,8 +708,7 @@ passive_mode(void) } char * -print_host(addr) - u_int32_t addr; +print_host(u_int32_t addr) { return print_host2(addr, 0); } @@ -733,8 +720,7 @@ print_host(addr) * confusing but should be slightly more helpful than just a "?". */ char * -print_host2(addr1, addr2) - u_int32_t addr1, addr2; +print_host2(u_int32_t addr1, u_int32_t addr2) { char *name; @@ -753,9 +739,7 @@ print_host2(addr1, addr2) * Print responses as received (reverse path from dst to src) */ void -print_trace(index, buf) - int index; - struct resp_buf *buf; +print_trace(int index, struct resp_buf *buf) { struct tr_resp *r; char *name; @@ -785,9 +769,7 @@ print_trace(index, buf) * See what kind of router is the next hop */ int -what_kind(buf, why) - struct resp_buf *buf; - char *why; +what_kind(struct resp_buf *buf, char *why) { u_int32_t smask; int retval; @@ -845,8 +827,7 @@ what_kind(buf, why) char * -scale(hop) - int *hop; +scale(int *hop) { if (*hop > -1000 && *hop < 10000) return (" ms"); *hop /= 1000; @@ -863,10 +844,7 @@ scale(hop) #define OUTS 2 #define BOTH 3 void -stat_line(r, s, have_next, rst) - struct tr_resp *r, *s; - int have_next; - int *rst; +stat_line(struct tr_resp *r, struct tr_resp *s, int have_next, int *rst) { int timediff = (fixtime(ntohl(s->tr_qarr)) - fixtime(ntohl(r->tr_qarr))) >> 16; @@ -961,8 +939,7 @@ stat_line(r, s, have_next, rst) * byteorder bugs in mrouted 3.6 on little-endian machines. */ void -fixup_stats(base, prev, new) - struct resp_buf *base, *prev, *new; +fixup_stats(struct resp_buf *base, struct resp_buf *prev, struct resp_buf *new) { int rno = base->len; struct tr_resp *b = base->resps + rno; @@ -1041,8 +1018,7 @@ fixup_stats(base, prev, new) * Print responses with statistics for forward path (from src to dst) */ int -print_stats(base, prev, new) - struct resp_buf *base, *prev, *new; +print_stats(struct resp_buf *base, struct resp_buf *prev, struct resp_buf *new) { int rtt, hop; char *ms; @@ -1132,9 +1108,7 @@ print_stats(base, prev, new) ***************************************************************************/ int -main(argc, argv) -int argc; -char *argv[]; +main(int argc, char *argv[]) { int udp; struct sockaddr_in addr; @@ -1654,7 +1628,7 @@ or multicast at ttl %d doesn't reach its last-hop router for that source\n", } void -check_vif_state() +check_vif_state(void) { logit(LOG_WARNING, errno, "sendto"); } @@ -1690,90 +1664,73 @@ logit(int severity, int syserr, char *format, ...) } /* dummies */ -void accept_probe(src, dst, p, datalen, level) - u_int32_t src, dst, level; - char *p; - int datalen; +void accept_probe(u_int32_t src, u_int32_t dst, char *p, int datalen, + u_int32_t level) { } -void accept_group_report(src, dst, group, r_type) - u_int32_t src, dst, group; - int r_type; + +void accept_group_report(u_int32_t src, u_int32_t dst, u_int32_t group, + int r_type) { } -void accept_neighbor_request2(src, dst) - u_int32_t src, dst; + +void accept_neighbor_request2(u_int32_t src, u_int32_t dst) { } -void accept_report(src, dst, p, datalen, level) - u_int32_t src, dst, level; - char *p; - int datalen; + +void accept_report(u_int32_t src, u_int32_t dst, char *p, int datalen, + u_int32_t level) { } -void accept_neighbor_request(src, dst) - u_int32_t src, dst; + +void accept_neighbor_request(u_int32_t src, u_int32_t dst) { } -void accept_prune(src, dst, p, datalen) - u_int32_t src, dst; - char *p; - int datalen; + +void accept_prune(u_int32_t src, u_int32_t dst, char *p, int datalen) { } -void accept_graft(src, dst, p, datalen) - u_int32_t src, dst; - char *p; - int datalen; + +void accept_graft(u_int32_t src, u_int32_t dst, char *p, int datalen) { } -void accept_g_ack(src, dst, p, datalen) - u_int32_t src, dst; - char *p; - int datalen; + +void accept_g_ack(u_int32_t src, u_int32_t dst, char *p, int datalen) { } -void add_table_entry(origin, mcastgrp) - u_int32_t origin, mcastgrp; + +void add_table_entry(u_int32_t origin, u_int32_t mcastgrp) { } -void accept_leave_message(src, dst, group) - u_int32_t src, dst, group; + +void accept_leave_message(u_int32_t src, u_int32_t dst, u_int32_t group) { } -void accept_mtrace(src, dst, group, data, no, datalen) - u_int32_t src, dst, group; - char *data; - u_int no; - int datalen; + +void accept_mtrace(u_int32_t src, u_int32_t dst, u_int32_t group, char *data, + u_int no, int datalen) { } -void accept_membership_query(src, dst, group, tmo) - u_int32_t src, dst, group; - int tmo; + +void accept_membership_query(u_int32_t src, u_int32_t dst, u_int32_t group, + int tmo) { } -void accept_neighbors(src, dst, p, datalen, level) - u_int32_t src, dst, level; - u_char *p; - int datalen; + +void accept_neighbors(u_int32_t src, u_int32_t dst, u_char *p, int datalen, + u_int32_t level) { } -void accept_neighbors2(src, dst, p, datalen, level) - u_int32_t src, dst, level; - u_char *p; - int datalen; + +void accept_neighbors2(u_int32_t src, u_int32_t dst, u_char *p, int datalen, + u_int32_t level) { } -void accept_info_request(src, dst, p, datalen) - u_int32_t src, dst; - u_char *p; - int datalen; + +void accept_info_request(u_int32_t src, u_int32_t dst, u_char *p, int datalen) { } -void accept_info_reply(src, dst, p, datalen) - u_int32_t src, dst; - u_char *p; - int datalen; + +void accept_info_reply(u_int32_t src, u_int32_t dst, u_char *p, int datalen) { } diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index d7f14d3a089..4492126250d 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,5 +1,5 @@ /* $NetBSD: compare.c,v 1.11 1996/09/05 09:56:48 mycroft Exp $ */ -/* $OpenBSD: compare.c,v 1.18 2004/05/02 17:35:08 millert Exp $ */ +/* $OpenBSD: compare.c,v 1.19 2004/08/01 18:32:20 deraadt Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: compare.c,v 1.18 2004/05/02 17:35:08 millert Exp $"; +static const char rcsid[] = "$OpenBSD: compare.c,v 1.19 2004/08/01 18:32:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -79,10 +79,7 @@ static char *ftype(u_int); } while (0) \ int -compare(name, s, p) - char *name; - NODE *s; - FTSENT *p; +compare(char *name, NODE *s, FTSENT *p) { u_int32_t len, val; int fd, label; @@ -343,8 +340,7 @@ typeerr: LABEL; } char * -inotype(type) - u_int type; +inotype(u_int type) { switch(type & S_IFMT) { case S_IFBLK: @@ -368,8 +364,7 @@ inotype(type) } static char * -ftype(type) - u_int type; +ftype(u_int type) { switch(type) { case F_BLOCK: @@ -393,8 +388,7 @@ ftype(type) } char * -rlink(name) - char *name; +rlink(char *name) { static char lbuf[MAXPATHLEN]; int len; diff --git a/usr.sbin/mtree/crc.c b/usr.sbin/mtree/crc.c index f67c0072223..026c657f303 100644 --- a/usr.sbin/mtree/crc.c +++ b/usr.sbin/mtree/crc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crc.c,v 1.1 2004/05/02 17:55:53 millert Exp $ */ +/* $OpenBSD: crc.c,v 1.2 2004/08/01 18:32:20 deraadt Exp $ */ /* $NetBSD: crc.c,v 1.7 1996/02/27 21:29:53 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93"; static char rcsid[] = "$NetBSD: crc.c,v 1.7 1996/02/27 21:29:53 jtc Exp $"; #else -static char rcsid[] = "$OpenBSD: crc.c,v 1.1 2004/05/02 17:55:53 millert Exp $"; +static char rcsid[] = "$OpenBSD: crc.c,v 1.2 2004/08/01 18:32:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -111,9 +111,7 @@ static const u_int32_t crctab[] = { u_int32_t crc_total = ~0; /* The crc over a number of files. */ int -crc(fd, cval, clen) - int fd; - u_int32_t *cval, *clen; +crc(int fd, u_int32_t *cval, u_int32_t *clen) { u_char *p; int nr; diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index b45a0f41ad2..04f42ff20b6 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -1,5 +1,5 @@ /* $NetBSD: create.c,v 1.11 1996/09/05 09:24:19 mycroft Exp $ */ -/* $OpenBSD: create.c,v 1.22 2004/07/09 16:22:03 deraadt Exp $ */ +/* $OpenBSD: create.c,v 1.23 2004/08/01 18:32:20 deraadt Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: create.c,v 1.22 2004/07/09 16:22:03 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: create.c,v 1.23 2004/08/01 18:32:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -133,9 +133,7 @@ cwalk(void) } static void -statf(indent, p) - int indent; - FTSENT *p; +statf(int indent, FTSENT *p) { struct group *gr; struct passwd *pw; @@ -263,12 +261,7 @@ statf(indent, p) #define MAXMODE MBITS + 1 static int -statd(t, parent, puid, pgid, pmode) - FTS *t; - FTSENT *parent; - uid_t *puid; - gid_t *pgid; - mode_t *pmode; +statd(FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode) { FTSENT *p; gid_t sgid; @@ -359,8 +352,7 @@ statd(t, parent, puid, pgid, pmode) } static int -dsort(a, b) - const FTSENT **a, **b; +dsort(const FTSENT **a, const FTSENT **b) { if (S_ISDIR((*a)->fts_statp->st_mode)) { if (!S_ISDIR((*b)->fts_statp->st_mode)) diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index 8c884fdd9b7..c6ebebcf662 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.17 2004/05/02 17:55:53 millert Exp $ */ +/* $OpenBSD: misc.c,v 1.18 2004/08/01 18:32:20 deraadt Exp $ */ /* $NetBSD: misc.c,v 1.4 1995/03/07 21:26:23 cgd Exp $ */ /*- @@ -72,9 +72,7 @@ static KEY keylist[] = { }; u_int -parsekey(name, needvaluep) - char *name; - int *needvaluep; +parsekey(char *name, int *needvaluep) { KEY *k, tmp; int keycompare(const void *, const void *); diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c index 8f81c2af112..388410dd82f 100644 --- a/usr.sbin/mtree/spec.c +++ b/usr.sbin/mtree/spec.c @@ -1,5 +1,5 @@ /* $NetBSD: spec.c,v 1.6 1995/03/07 21:12:12 cgd Exp $ */ -/* $OpenBSD: spec.c,v 1.21 2004/07/09 16:22:03 deraadt Exp $ */ +/* $OpenBSD: spec.c,v 1.22 2004/08/01 18:32:20 deraadt Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: spec.c,v 1.21 2004/07/09 16:22:03 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: spec.c,v 1.22 2004/08/01 18:32:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -168,9 +168,7 @@ noparent: error("no parent node"); } static void -set(t, ip) - char *t; - NODE *ip; +set(char *t, NODE *ip) { int type; char *kw, *val = NULL; @@ -311,9 +309,7 @@ set(t, ip) } static void -unset(t, ip) - char *t; - NODE *ip; +unset(char *t, NODE *ip) { char *p; diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index aa6c34654a1..73f511e07a9 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.14 2004/07/09 16:22:03 deraadt Exp $ */ +/* $OpenBSD: verify.c,v 1.15 2004/08/01 18:32:20 deraadt Exp $ */ /* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: verify.c,v 1.14 2004/07/09 16:22:03 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: verify.c,v 1.15 2004/08/01 18:32:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -153,10 +153,7 @@ extra: } static void -miss(p, tail, len) - NODE *p; - char *tail; - size_t len; +miss(NODE *p, char *tail, size_t len) { int create; char *tp; diff --git a/usr.sbin/netgroup_mkdb/str.c b/usr.sbin/netgroup_mkdb/str.c index dafa49180cb..4b2923c6e33 100644 --- a/usr.sbin/netgroup_mkdb/str.c +++ b/usr.sbin/netgroup_mkdb/str.c @@ -30,7 +30,7 @@ */ #ifndef lint -static char *rcsid = "$Id: str.c,v 1.1 1995/10/18 08:47:57 deraadt Exp $"; +static char *rcsid = "$Id: str.c,v 1.2 2004/08/01 18:32:20 deraadt Exp $"; #endif /* @@ -46,8 +46,7 @@ static char *rcsid = "$Id: str.c,v 1.1 1995/10/18 08:47:57 deraadt Exp $"; * str_init(): Initialize string */ void -str_init(s) - struct string *s; +str_init(struct string *s) { s->s_str = NULL; s->s_len = 0; @@ -58,10 +57,7 @@ str_init(s) * str_append(): Append string allocating buffer as necessary */ void -str_append(buf, str, del) - struct string *buf; - const char *str; - int del; +str_append(struct string *buf, const char *str, int del) { size_t len = strlen(str) + 1; @@ -82,10 +78,7 @@ str_append(buf, str, del) * str_prepend(): Prepend string allocating buffer as necessary */ void -str_prepend(buf, str, del) - struct string *buf; - const char *str; - int del; +str_prepend(struct string *buf, const char *str, int del) { char *ptr, *sptr; size_t len = strlen(str) + 1; @@ -110,8 +103,7 @@ str_prepend(buf, str, del) * str_free(): Free a string */ void -str_free(s) - struct string *s; +str_free(struct string *s) { free(s->s_str); s->s_str = NULL; diff --git a/usr.sbin/netgroup_mkdb/util.c b/usr.sbin/netgroup_mkdb/util.c index b418409caf2..7c83232c1ca 100644 --- a/usr.sbin/netgroup_mkdb/util.c +++ b/usr.sbin/netgroup_mkdb/util.c @@ -30,7 +30,7 @@ */ #ifndef lint -static char *rcsid = "$Id: util.c,v 1.2 1997/04/15 15:06:13 deraadt Exp $"; +static char *rcsid = "$Id: util.c,v 1.3 2004/08/01 18:32:20 deraadt Exp $"; #endif #include <err.h> @@ -43,8 +43,7 @@ static char *rcsid = "$Id: util.c,v 1.2 1997/04/15 15:06:13 deraadt Exp $"; * Error checked malloc */ void * -emalloc(s) - size_t s; +emalloc(size_t s) { void *ptr = malloc(s); if (ptr == NULL) @@ -58,9 +57,7 @@ emalloc(s) * Error checked realloc */ void * -erealloc(p, s) - void *p; - size_t s; +erealloc(void *p, size_t s) { void *ptr = realloc(p, s); if (ptr == NULL) @@ -75,9 +72,7 @@ erealloc(p, s) * and eliminating trailing newlines. */ char * -getline(fp, size) - FILE *fp; - size_t *size; +getline(FILE *fp, size_t *size) { size_t s, len = 0; char *buf = NULL; diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index 3886c103a1d..66a5726b5e7 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route6d.c,v 1.40 2003/10/31 00:32:07 itojun Exp $ */ +/* $OpenBSD: route6d.c,v 1.41 2004/08/01 18:32:20 deraadt Exp $ */ /* $KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #if 0 -static char _rcsid[] = "$OpenBSD: route6d.c,v 1.40 2003/10/31 00:32:07 itojun Exp $"; +static char _rcsid[] = "$OpenBSD: route6d.c,v 1.41 2004/08/01 18:32:20 deraadt Exp $"; #endif #include <stdio.h> @@ -279,9 +279,7 @@ void setindex2ifc(int, struct ifc *); #define MALLOC(type) ((type *)malloc(sizeof(type))) int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { int ch; int error = 0; @@ -490,8 +488,7 @@ main(argc, argv) } void -sighandler(signo) - int signo; +sighandler(int signo) { switch (signo) { @@ -717,9 +714,7 @@ static int nrt; static struct netinfo6 *np; void -ripflush(ifcp, sin6) - struct ifc *ifcp; - struct sockaddr_in6 *sin6; +ripflush(struct ifc *ifcp, struct sockaddr_in6 *sin6) { int i; int error; @@ -768,10 +763,7 @@ ripflush(ifcp, sin6) * Generate RIP6_RESPONSE packets and send them. */ void -ripsend(ifcp, sin6, flag) - struct ifc *ifcp; - struct sockaddr_in6 *sin6; - int flag; +ripsend(struct ifc *ifcp, struct sockaddr_in6 *sin6, int flag) { struct riprt *rrt; struct in6_addr *nh; /* next hop */ @@ -897,9 +889,7 @@ ripsend(ifcp, sin6, flag) * outbound filter logic, per-route/interface. */ int -out_filter(rrt, ifcp) - struct riprt *rrt; - struct ifc *ifcp; +out_filter(struct riprt *rrt, struct ifc *ifcp) { struct iff *iffp; struct in6_addr ia; @@ -970,9 +960,7 @@ out_filter(rrt, ifcp) * It checks options specified in the arguments and the split horizon rule. */ int -tobeadv(rrt, ifcp) - struct riprt *rrt; - struct ifc *ifcp; +tobeadv(struct riprt *rrt, struct ifc *ifcp) { /* Special care for static routes */ @@ -997,9 +985,7 @@ tobeadv(rrt, ifcp) * Send a rip packet actually. */ int -sendpacket(sin6, len) - struct sockaddr_in6 *sin6; - int len; +sendpacket(struct sockaddr_in6 *sin6, int len) { struct msghdr m; struct cmsghdr *cm; @@ -1347,8 +1333,7 @@ riprecv(void) * Send all routes request packet to the specified interface. */ void -sendrequest(ifcp) - struct ifc *ifcp; +sendrequest(struct ifc *ifcp) { struct netinfo6 *np; int error; @@ -1376,11 +1361,8 @@ sendrequest(ifcp) * Process a RIP6_REQUEST packet. */ void -riprequest(ifcp, np, nn, sin6) - struct ifc *ifcp; - struct netinfo6 *np; - int nn; - struct sockaddr_in6 *sin6; +riprequest(struct ifc *ifcp, struct netinfo6 *np, int nn, + struct sockaddr_in6 *sin6) { int i; struct riprt *rrt; @@ -1480,11 +1462,7 @@ ifconfig(void) } void -ifconfig1(name, sa, ifcp, s) - const char *name; - const struct sockaddr *sa; - struct ifc *ifcp; - int s; +ifconfig1(const char *name, const struct sockaddr *sa, struct ifc *ifcp, int s) { struct in6_ifreq ifr; const struct sockaddr_in6 *sin6; @@ -1794,10 +1772,8 @@ rtrecv(void) * remove specified route from the internal routing table. */ int -rt_del(sdst, sgw, smask) - const struct sockaddr_in6 *sdst; - const struct sockaddr_in6 *sgw; - const struct sockaddr_in6 *smask; +rt_del(const struct sockaddr_in6 *sdst, const struct sockaddr_in6 *sgw, + const struct sockaddr_in6 *smask) { const struct in6_addr *dst = NULL; const struct in6_addr *gw = NULL; @@ -1893,10 +1869,8 @@ rt_del(sdst, sgw, smask) * remove specified address from internal interface/routing table. */ int -rt_deladdr(ifcp, sifa, smask) - struct ifc *ifcp; - const struct sockaddr_in6 *sifa; - const struct sockaddr_in6 *smask; +rt_deladdr(struct ifc *ifcp, const struct sockaddr_in6 *sifa, + const struct sockaddr_in6 *smask) { const struct in6_addr *addr = NULL; int prefix; @@ -2005,9 +1979,7 @@ rt_deladdr(ifcp, sifa, smask) * list. */ int -ifrt(ifcp, again) - struct ifc *ifcp; - int again; +ifrt(struct ifc *ifcp, int again) { struct ifac *ifa; struct riprt *rrt = NULL, *search_rrt, *prev_rrt, *loop_rrt; @@ -2125,9 +2097,7 @@ ifrt(ifcp, again) * since BSD kernels do not look at prefix length on p2p interfaces. */ void -ifrt_p2p(ifcp, again) - struct ifc *ifcp; - int again; +ifrt_p2p(struct ifc *ifcp, int again) { struct ifac *ifa; struct riprt *rrt, *orrt, *prevrrt; @@ -2295,8 +2265,7 @@ ifrt_p2p(ifcp, again) } int -getifmtu(ifindex) - int ifindex; +getifmtu(int ifindex) { int mib[6]; char *buf; @@ -2335,8 +2304,7 @@ getifmtu(ifindex) } const char * -rttypes(rtm) - struct rt_msghdr *rtm; +rttypes(struct rt_msghdr *rtm) { #define RTTYPE(s, f) \ do { \ @@ -2380,8 +2348,7 @@ do { \ } const char * -rtflags(rtm) - struct rt_msghdr *rtm; +rtflags(struct rt_msghdr *rtm) { static char buf[BUFSIZ]; @@ -2446,8 +2413,7 @@ do { \ } const char * -ifflags(flags) - int flags; +ifflags(int flags) { static char buf[BUFSIZ]; @@ -2486,8 +2452,7 @@ do { \ } void -krtread(again) - int again; +krtread(int again) { int mib[6]; size_t msize; @@ -2538,9 +2503,7 @@ krtread(again) } void -rt_entry(rtm, again) - struct rt_msghdr *rtm; - int again; +rt_entry(struct rt_msghdr *rtm, int again) { struct sockaddr_in6 *sin6_dst, *sin6_gw, *sin6_mask; struct sockaddr_in6 *sin6_genmask, *sin6_ifp; @@ -2700,10 +2663,7 @@ rt_entry(rtm, again) } int -addroute(rrt, gw, ifcp) - struct riprt *rrt; - const struct in6_addr *gw; - struct ifc *ifcp; +addroute(struct riprt *rrt, const struct in6_addr *gw, struct ifc *ifcp) { struct netinfo6 *np; u_char buf[BUFSIZ], buf1[BUFSIZ], buf2[BUFSIZ]; @@ -2773,9 +2733,7 @@ addroute(rrt, gw, ifcp) } int -delroute(np, gw) - struct netinfo6 *np; - struct in6_addr *gw; +delroute(struct netinfo6 *np, struct in6_addr *gw) { u_char buf[BUFSIZ], buf2[BUFSIZ]; struct rt_msghdr *rtm; @@ -2840,9 +2798,7 @@ delroute(np, gw) } struct in6_addr * -getroute(np, gw) - struct netinfo6 *np; - struct in6_addr *gw; +getroute(struct netinfo6 *np, struct in6_addr *gw) { u_char buf[BUFSIZ]; int myseq; @@ -2889,8 +2845,7 @@ getroute(np, gw) } const char * -inet6_n2p(p) - const struct in6_addr *p; +inet6_n2p(const struct in6_addr *p) { static char buf[BUFSIZ]; @@ -2898,8 +2853,7 @@ inet6_n2p(p) } void -ifrtdump(sig) - int sig; +ifrtdump(int sig) { ifdump(sig); @@ -2907,8 +2861,7 @@ ifrtdump(sig) } void -ifdump(sig) - int sig; +ifdump(int sig) { struct ifc *ifcp; FILE *dump; @@ -2943,9 +2896,7 @@ ifdump(sig) } void -ifdump0(dump, ifcp) - FILE *dump; - const struct ifc *ifcp; +ifdump0(FILE *dump, const struct ifc *ifcp) { struct ifac *ifa; struct iff *iffp; @@ -3002,8 +2953,7 @@ ifdump0(dump, ifcp) } void -rtdump(sig) - int sig; +rtdump(int sig) { struct riprt *rrt; char buf[BUFSIZ]; @@ -3183,10 +3133,7 @@ ifonly: * with the address and prefix length specified in the arguments. */ struct ifac * -ifa_match(ifcp, ia, plen) - const struct ifc *ifcp; - const struct in6_addr *ia; - int plen; +ifa_match(const struct ifc *ifcp, const struct in6_addr *ia, int plen) { struct ifac *ifa; @@ -3204,9 +3151,7 @@ ifa_match(ifcp, ia, plen) * Note: This is not a rtalloc(). Therefore exact match is necessary. */ struct riprt * -rtsearch(np, prev_rrt) - struct netinfo6 *np; - struct riprt **prev_rrt; +rtsearch(struct netinfo6 *np, struct riprt **prev_rrt) { struct riprt *rrt; @@ -3226,8 +3171,7 @@ rtsearch(np, prev_rrt) } int -sin6mask2len(sin6) - const struct sockaddr_in6 *sin6; +sin6mask2len(const struct sockaddr_in6 *sin6) { return mask2len(&sin6->sin6_addr, @@ -3235,9 +3179,7 @@ sin6mask2len(sin6) } int -mask2len(addr, lenlim) - const struct in6_addr *addr; - int lenlim; +mask2len(const struct in6_addr *addr, int lenlim) { int i = 0, j; const u_char *p = (const u_char *)addr; @@ -3264,8 +3206,7 @@ mask2len(addr, lenlim) } void -applymask(addr, mask) - struct in6_addr *addr, *mask; +applymask(struct in6_addr *addr, struct in6_addr *mask) { int i; u_long *p, *q; @@ -3280,9 +3221,7 @@ static const u_char plent[8] = { }; void -applyplen(ia, plen) - struct in6_addr *ia; - int plen; +applyplen(struct in6_addr *ia, int plen) { u_char *p; int i; @@ -3302,8 +3241,7 @@ static const int pl2m[9] = { }; struct in6_addr * -plen2mask(n) - int n; +plen2mask(int n) { static struct in6_addr ia; u_char *p; @@ -3323,8 +3261,7 @@ plen2mask(n) } char * -allocopy(p) - char *p; +allocopy(char *p) { int len = strlen(p) + 1; char *q = (char *)malloc(len); @@ -3358,8 +3295,7 @@ hms(void) #define RIPRANDDEV 1.0 /* 30 +- 15, max - min = 30 */ int -ripinterval(timer) - int timer; +ripinterval(int timer) { double r = rand(); @@ -3454,8 +3390,7 @@ if_maxindex(void) } struct ifc * -ifc_find(name) - char *name; +ifc_find(char *name) { struct ifc *ifcp; @@ -3467,9 +3402,7 @@ ifc_find(name) } struct iff * -iff_find(ifcp, type) - struct ifc *ifcp; - int type; +iff_find(struct ifc *ifcp, int type) { struct iff *iffp; @@ -3481,9 +3414,7 @@ iff_find(ifcp, type) } void -setindex2ifc(idx, ifcp) - int idx; - struct ifc *ifcp; +setindex2ifc(int idx, struct ifc *ifcp) { int n; struct ifc **p; diff --git a/usr.sbin/sesd/srcs/chpmon.c b/usr.sbin/sesd/srcs/chpmon.c index 2fd11fceac0..b7cc1a283b9 100644 --- a/usr.sbin/sesd/srcs/chpmon.c +++ b/usr.sbin/sesd/srcs/chpmon.c @@ -48,12 +48,8 @@ #define BADSTAT \ (SES_ENCSTAT_UNRECOV|SES_ENCSTAT_CRITICAL|SES_ENCSTAT_NONCRITICAL) -int main(int, char **); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd, delay, dev; ses_encstat stat, *carray; diff --git a/usr.sbin/sesd/srcs/eltsub.c b/usr.sbin/sesd/srcs/eltsub.c index afa0e107cc5..83395c63b94 100644 --- a/usr.sbin/sesd/srcs/eltsub.c +++ b/usr.sbin/sesd/srcs/eltsub.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: eltsub.c,v 1.4 2003/04/03 18:49:51 deraadt Exp $ */ +/* $OpenBSD: eltsub.c,v 1.5 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -45,8 +45,7 @@ static char *scode2ascii(u_char); char *stat2ascii(int, u_char *); char * -geteltnm(type) - int type; +geteltnm(int type) { static char rbuf[132]; @@ -122,8 +121,7 @@ geteltnm(type) } static char * -scode2ascii(code) - u_char code; +scode2ascii(u_char code) { static char rbuf[32]; switch (code & 0xf) { @@ -160,9 +158,7 @@ scode2ascii(code) char * -stat2ascii(eletype, cstat) - int eletype; - u_char *cstat; +stat2ascii(int eletype, u_char *cstat) { static char ebuf[256], *scode; diff --git a/usr.sbin/sesd/srcs/getencstat.c b/usr.sbin/sesd/srcs/getencstat.c index fe899712e69..cfa0b4c11b0 100644 --- a/usr.sbin/sesd/srcs/getencstat.c +++ b/usr.sbin/sesd/srcs/getencstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getencstat.c,v 1.4 2003/07/18 22:58:56 david Exp $ */ +/* $OpenBSD: getencstat.c,v 1.5 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -44,12 +44,9 @@ extern char *geteltnm(int); extern char *stat2ascii(int, u_char *); -int main(int, char **); int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { ses_object *objp; ses_objstat ob; diff --git a/usr.sbin/sesd/srcs/getnobj.c b/usr.sbin/sesd/srcs/getnobj.c index 8c040c1e269..d046d8859ea 100644 --- a/usr.sbin/sesd/srcs/getnobj.c +++ b/usr.sbin/sesd/srcs/getnobj.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getnobj.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: getnobj.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -42,12 +42,8 @@ #include <sys/ioctl.h> #include SESINC -int main(int, char **); - int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { unsigned int nobj; int fd; diff --git a/usr.sbin/sesd/srcs/getobjmap.c b/usr.sbin/sesd/srcs/getobjmap.c index ebe1686e4c4..92f3e728942 100644 --- a/usr.sbin/sesd/srcs/getobjmap.c +++ b/usr.sbin/sesd/srcs/getobjmap.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getobjmap.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: getobjmap.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,13 +41,10 @@ #include <sys/ioctl.h> #include SESINC -int main(int, char **); extern char *geteltnm(int); int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { ses_object *objp; int nobj, fd, i; diff --git a/usr.sbin/sesd/srcs/getobjstat.c b/usr.sbin/sesd/srcs/getobjstat.c index b55e1f5ff92..9d63d0733bb 100644 --- a/usr.sbin/sesd/srcs/getobjstat.c +++ b/usr.sbin/sesd/srcs/getobjstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: getobjstat.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: getobjstat.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -40,12 +40,8 @@ #include <sys/ioctl.h> #include SESINC -int main(int, char **); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; int i; diff --git a/usr.sbin/sesd/srcs/inienc.c b/usr.sbin/sesd/srcs/inienc.c index 61be17e1bda..ad041440c51 100644 --- a/usr.sbin/sesd/srcs/inienc.c +++ b/usr.sbin/sesd/srcs/inienc.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: inienc.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: inienc.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,12 +41,8 @@ #include <sys/ioctl.h> #include SESINC -int(int, char **); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; diff --git a/usr.sbin/sesd/srcs/sesd.c b/usr.sbin/sesd/srcs/sesd.c index 93e415bcb23..3155779e782 100644 --- a/usr.sbin/sesd/srcs/sesd.c +++ b/usr.sbin/sesd/srcs/sesd.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: sesd.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: sesd.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -45,16 +45,13 @@ #define ALLSTAT (SES_ENCSTAT_UNRECOV | SES_ENCSTAT_CRITICAL | \ SES_ENCSTAT_NONCRITICAL | SES_ENCSTAT_INFO) -int main(int, char **); /* * Monitor named SES devices and note (via syslog) any changes in status. */ int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { static char *usage = "usage: %s [ -d ] [ -t pollinterval ] device [ device ]\n"; diff --git a/usr.sbin/sesd/srcs/setencstat.c b/usr.sbin/sesd/srcs/setencstat.c index 358b3580b98..0718477fdb8 100644 --- a/usr.sbin/sesd/srcs/setencstat.c +++ b/usr.sbin/sesd/srcs/setencstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: setencstat.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: setencstat.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,12 +41,8 @@ #include <sys/ioctl.h> #include SESINC -int main(int, char **); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; long val; diff --git a/usr.sbin/sesd/srcs/setobjstat.c b/usr.sbin/sesd/srcs/setobjstat.c index 5cdd252f4e7..69380d82391 100644 --- a/usr.sbin/sesd/srcs/setobjstat.c +++ b/usr.sbin/sesd/srcs/setobjstat.c @@ -1,6 +1,6 @@ /* $NetBSD: $ */ /* $FreeBSD: $ */ -/* $OpenBSD: setobjstat.c,v 1.3 2002/02/16 21:28:09 millert Exp $ */ +/* $OpenBSD: setobjstat.c,v 1.4 2004/08/01 18:32:21 deraadt Exp $ */ /* * Copyright (c) 2000 by Matthew Jacob * All rights reserved. @@ -41,12 +41,8 @@ #include <sys/ioctl.h> #include SESINC -int main(int, char **); - int -main(a, v) - int a; - char **v; +main(int a, char *v[]) { int fd; int i; diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index bf3edf09a14..11ff359a237 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute6.c,v 1.37 2004/01/25 03:25:49 deraadt Exp $ */ +/* $OpenBSD: traceroute6.c,v 1.38 2004/08/01 18:32:21 deraadt Exp $ */ /* $KAME: traceroute6.c,v 1.63 2002/10/24 12:53:25 itojun Exp $ */ /* @@ -906,9 +906,7 @@ main(int argc, char *argv[]) } int -wait_for_reply(sock, mhdr) - int sock; - struct msghdr *mhdr; +wait_for_reply(int sock, struct msghdr *mhdr) { #ifdef HAVE_POLL struct pollfd pfd[1]; diff --git a/usr.sbin/wsconscfg/wsconscfg.c b/usr.sbin/wsconscfg/wsconscfg.c index f3d6c57ab2d..03bb7b0d7d4 100644 --- a/usr.sbin/wsconscfg/wsconscfg.c +++ b/usr.sbin/wsconscfg/wsconscfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsconscfg.c,v 1.10 2004/07/30 23:13:48 jmc Exp $ */ +/* $OpenBSD: wsconscfg.c,v 1.11 2004/08/01 18:32:21 deraadt Exp $ */ /* $NetBSD: wsconscfg.c,v 1.4 1999/07/29 18:24:10 augustss Exp $ */ /* @@ -62,9 +62,7 @@ usage(void) } int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { char *wsdev; int c, delete, kbd, idx, wsfd, res, mux; diff --git a/usr.sbin/wsfontload/wsfontload.c b/usr.sbin/wsfontload/wsfontload.c index 40e343facca..52fc2aae1bf 100644 --- a/usr.sbin/wsfontload/wsfontload.c +++ b/usr.sbin/wsfontload/wsfontload.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfontload.c,v 1.7 2004/07/09 16:22:04 deraadt Exp $ */ +/* $OpenBSD: wsfontload.c,v 1.8 2004/08/01 18:32:21 deraadt Exp $ */ /* $NetBSD: wsfontload.c,v 1.2 2000/01/05 18:46:43 ad Exp $ */ /* @@ -81,9 +81,7 @@ struct { }; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { char *wsdev, *p; struct wsdisplay_font f; @@ -211,8 +209,7 @@ main(argc, argv) } static int -getencoding(name) - char *name; +getencoding(char *name) { int i; |