Skip to content
Browse files

Ansify some function definitions that were previously overlooked.

  • Loading branch information...
1 parent b09f9ad commit 89a89091c12ec84cf9b8955493e873d019d439fa Sascha Wildner committed
View
301 lib/libipsec/pfkey.c
@@ -88,8 +88,7 @@ static int supported_map[] = {
};
static int
-findsupportedmap(satype)
- int satype;
+findsupportedmap(int satype)
{
int i;
@@ -100,8 +99,7 @@ findsupportedmap(satype)
}
static struct sadb_alg *
-findsupportedalg(satype, alg_id)
- u_int satype, alg_id;
+findsupportedalg(u_int satype, u_int alg_id)
{
int algno;
int tlen;
@@ -138,8 +136,7 @@ findsupportedalg(satype, alg_id)
}
static int
-setsupportedmap(sup)
- struct sadb_supported *sup;
+setsupportedmap(struct sadb_supported *sup)
{
struct sadb_supported **ipsup;
@@ -178,10 +175,7 @@ setsupportedmap(sup)
* 0: valid.
*/
int
-ipsec_check_keylen(supported, alg_id, keylen)
- u_int supported;
- u_int alg_id;
- u_int keylen;
+ipsec_check_keylen(u_int supported, u_int alg_id, u_int keylen)
{
int satype;
@@ -210,10 +204,7 @@ ipsec_check_keylen(supported, alg_id, keylen)
* 0: valid.
*/
int
-ipsec_check_keylen2(satype, alg_id, keylen)
- u_int satype;
- u_int alg_id;
- u_int keylen;
+ipsec_check_keylen2(u_int satype, u_int alg_id, u_int keylen)
{
struct sadb_alg *alg;
@@ -239,9 +230,7 @@ ipsec_check_keylen2(satype, alg_id, keylen)
* 0: valid.
*/
int
-ipsec_get_keylen(supported, alg_id, alg0)
- u_int supported, alg_id;
- struct sadb_alg *alg0;
+ipsec_get_keylen(u_int supported, u_int alg_id, struct sadb_alg *alg0)
{
struct sadb_alg *alg;
u_int satype;
@@ -284,8 +273,7 @@ static u_int soft_lifetime_addtime_rate = PFKEY_SOFT_LIFETIME_RATE;
static u_int soft_lifetime_usetime_rate = PFKEY_SOFT_LIFETIME_RATE;
u_int
-pfkey_set_softrate(type, rate)
- u_int type, rate;
+pfkey_set_softrate(u_int type, u_int rate)
{
__ipsec_errcode = EIPSEC_NO_ERROR;
@@ -316,8 +304,7 @@ pfkey_set_softrate(type, rate)
* ATTENTION: ~0 is returned if invalid type was passed.
*/
u_int
-pfkey_get_softrate(type)
- u_int type;
+pfkey_get_softrate(u_int type)
{
switch (type) {
case SADB_X_LIFETIME_ALLOCATIONS:
@@ -340,11 +327,9 @@ pfkey_get_softrate(type)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_getspi(so, satype, mode, src, dst, min, max, reqid, seq)
- int so;
- u_int satype, mode;
- struct sockaddr *src, *dst;
- u_int32_t min, max, reqid, seq;
+pfkey_send_getspi(int so, u_int satype, u_int mode, struct sockaddr *src,
+ struct sockaddr *dst, u_int32_t min, u_int32_t max, u_int32_t reqid,
+ u_int32_t seq)
{
struct sadb_msg *newmsg;
caddr_t ep;
@@ -469,18 +454,11 @@ pfkey_send_getspi(so, satype, mode, src, dst, min, max, reqid, seq)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_update(so, satype, mode, src, dst, spi, reqid, wsize,
- keymat, e_type, e_keylen, a_type, a_keylen, flags,
- l_alloc, l_bytes, l_addtime, l_usetime, seq)
- int so;
- u_int satype, mode, wsize;
- struct sockaddr *src, *dst;
- u_int32_t spi, reqid;
- caddr_t keymat;
- u_int e_type, e_keylen, a_type, a_keylen, flags;
- u_int32_t l_alloc;
- u_int64_t l_bytes, l_addtime, l_usetime;
- u_int32_t seq;
+pfkey_send_update(int so, u_int satype, u_int mode, struct sockaddr *src,
+ struct sockaddr *dst, u_int32_t spi, u_int32_t reqid, u_int wsize,
+ caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type, u_int a_keylen,
+ u_int flags,u_int32_t l_alloc, u_int64_t l_bytes, u_int64_t l_addtime,
+ u_int64_t l_usetime, u_int32_t seq)
{
int len;
if ((len = pfkey_send_x1(so, SADB_UPDATE, satype, mode, src, dst, spi,
@@ -500,18 +478,11 @@ pfkey_send_update(so, satype, mode, src, dst, spi, reqid, wsize,
* -1 : error occured, and set errno.
*/
int
-pfkey_send_add(so, satype, mode, src, dst, spi, reqid, wsize,
- keymat, e_type, e_keylen, a_type, a_keylen, flags,
- l_alloc, l_bytes, l_addtime, l_usetime, seq)
- int so;
- u_int satype, mode, wsize;
- struct sockaddr *src, *dst;
- u_int32_t spi, reqid;
- caddr_t keymat;
- u_int e_type, e_keylen, a_type, a_keylen, flags;
- u_int32_t l_alloc;
- u_int64_t l_bytes, l_addtime, l_usetime;
- u_int32_t seq;
+pfkey_send_add(int so, u_int satype, u_int mode, struct sockaddr *src,
+ struct sockaddr *dst, u_int32_t spi, u_int32_t reqid, u_int wsize,
+ caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type, u_int a_keylen,
+ u_int flags, u_int32_t l_alloc, u_int64_t l_bytes, u_int64_t l_addtime,
+ u_int64_t l_usetime, u_int32_t seq)
{
int len;
if ((len = pfkey_send_x1(so, SADB_ADD, satype, mode, src, dst, spi,
@@ -530,11 +501,8 @@ pfkey_send_add(so, satype, mode, src, dst, spi, reqid, wsize,
* -1 : error occured, and set errno.
*/
int
-pfkey_send_delete(so, satype, mode, src, dst, spi)
- int so;
- u_int satype, mode;
- struct sockaddr *src, *dst;
- u_int32_t spi;
+pfkey_send_delete(int so, u_int satype, u_int mode, struct sockaddr *src,
+ struct sockaddr *dst, u_int32_t spi)
{
int len;
if ((len = pfkey_send_x2(so, SADB_DELETE, satype, mode, src, dst, spi)) < 0)
@@ -553,10 +521,8 @@ pfkey_send_delete(so, satype, mode, src, dst, spi)
* -1 : error occured, and set errno
*/
int
-pfkey_send_delete_all(so, satype, mode, src, dst)
- int so;
- u_int satype, mode;
- struct sockaddr *src, *dst;
+pfkey_send_delete_all(int so, u_int satype, u_int mode, struct sockaddr *src,
+ struct sockaddr *dst)
{
struct sadb_msg *newmsg;
int len;
@@ -635,11 +601,8 @@ pfkey_send_delete_all(so, satype, mode, src, dst)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_get(so, satype, mode, src, dst, spi)
- int so;
- u_int satype, mode;
- struct sockaddr *src, *dst;
- u_int32_t spi;
+pfkey_send_get(int so, u_int satype, u_int mode, struct sockaddr *src,
+ struct sockaddr *dst, u_int32_t spi)
{
int len;
if ((len = pfkey_send_x2(so, SADB_GET, satype, mode, src, dst, spi)) < 0)
@@ -655,9 +618,7 @@ pfkey_send_get(so, satype, mode, src, dst, spi)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_register(so, satype)
- int so;
- u_int satype;
+pfkey_send_register(int so, u_int satype)
{
int len, algno;
@@ -697,8 +658,7 @@ pfkey_send_register(so, satype)
* -1: error occured, and set errno.
*/
int
-pfkey_recv_register(so)
- int so;
+pfkey_recv_register(int so)
{
pid_t pid = getpid();
struct sadb_msg *newmsg;
@@ -734,9 +694,7 @@ pfkey_recv_register(so)
* -1: error occured, and set errno.
*/
int
-pfkey_set_supported(msg, tlen)
- struct sadb_msg *msg;
- int tlen;
+pfkey_set_supported(struct sadb_msg *msg, int tlen)
{
struct sadb_supported *sup;
caddr_t p;
@@ -798,9 +756,7 @@ pfkey_set_supported(msg, tlen)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_flush(so, satype)
- int so;
- u_int satype;
+pfkey_send_flush(int so, u_int satype)
{
int len;
@@ -817,9 +773,7 @@ pfkey_send_flush(so, satype)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_dump(so, satype)
- int so;
- u_int satype;
+pfkey_send_dump(int so, u_int satype)
{
int len;
@@ -842,9 +796,7 @@ pfkey_send_dump(so, satype)
* algorithms is.
*/
int
-pfkey_send_promisc_toggle(so, flag)
- int so;
- int flag;
+pfkey_send_promisc_toggle(int so, int flag)
{
int len;
@@ -861,13 +813,9 @@ pfkey_send_promisc_toggle(so, flag)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdadd(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int prefs, prefd, proto;
- caddr_t policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_spdadd(int so, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy,
+ int policylen, u_int32_t seq)
{
int len;
@@ -887,15 +835,9 @@ pfkey_send_spdadd(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdadd2(so, src, prefs, dst, prefd, proto, ltime, vtime,
- policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int prefs, prefd, proto;
- u_int64_t ltime, vtime;
- caddr_t policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_spdadd2(int so, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, u_int64_t ltime,
+ u_int64_t vtime, caddr_t policy, int policylen, u_int32_t seq)
{
int len;
@@ -915,13 +857,9 @@ pfkey_send_spdadd2(so, src, prefs, dst, prefd, proto, ltime, vtime,
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdupdate(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int prefs, prefd, proto;
- caddr_t policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_spdupdate(int so, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy,
+ int policylen, u_int32_t seq)
{
int len;
@@ -941,15 +879,9 @@ pfkey_send_spdupdate(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdupdate2(so, src, prefs, dst, prefd, proto, ltime, vtime,
- policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int prefs, prefd, proto;
- u_int64_t ltime, vtime;
- caddr_t policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_spdupdate2(int so, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, u_int64_t ltime,
+ u_int64_t vtime, caddr_t policy, int policylen, u_int32_t seq)
{
int len;
@@ -969,13 +901,9 @@ pfkey_send_spdupdate2(so, src, prefs, dst, prefd, proto, ltime, vtime,
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spddelete(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int prefs, prefd, proto;
- caddr_t policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_spddelete(int so, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy,
+ int policylen, u_int32_t seq)
{
int len;
@@ -1000,9 +928,7 @@ pfkey_send_spddelete(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spddelete2(so, spid)
- int so;
- u_int32_t spid;
+pfkey_send_spddelete2(int so, u_int32_t spid)
{
int len;
@@ -1019,9 +945,7 @@ pfkey_send_spddelete2(so, spid)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdget(so, spid)
- int so;
- u_int32_t spid;
+pfkey_send_spdget(int so, u_int32_t spid)
{
int len;
@@ -1038,13 +962,9 @@ pfkey_send_spdget(so, spid)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdsetidx(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int prefs, prefd, proto;
- caddr_t policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_spdsetidx(int so, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy,
+ int policylen, u_int32_t seq)
{
int len;
@@ -1069,8 +989,7 @@ pfkey_send_spdsetidx(so, src, prefs, dst, prefd, proto, policy, policylen, seq)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spdflush(so)
- int so;
+pfkey_send_spdflush(int so)
{
int len;
@@ -1087,8 +1006,7 @@ pfkey_send_spdflush(so)
* -1 : error occured, and set errno.
*/
int
-pfkey_send_spddump(so)
- int so;
+pfkey_send_spddump(int so)
{
int len;
@@ -1100,17 +1018,11 @@ pfkey_send_spddump(so)
/* sending SADB_ADD or SADB_UPDATE message to the kernel */
static int
-pfkey_send_x1(so, type, satype, mode, src, dst, spi, reqid, wsize,
- keymat, e_type, e_keylen, a_type, a_keylen, flags,
- l_alloc, l_bytes, l_addtime, l_usetime, seq)
- int so;
- u_int type, satype, mode;
- struct sockaddr *src, *dst;
- u_int32_t spi, reqid;
- u_int wsize;
- caddr_t keymat;
- u_int e_type, e_keylen, a_type, a_keylen, flags;
- u_int32_t l_alloc, l_bytes, l_addtime, l_usetime, seq;
+pfkey_send_x1(int so, u_int type, u_int satype, u_int mode,
+ struct sockaddr *src, struct sockaddr *dst, u_int32_t spi, u_int32_t reqid,
+ u_int wsize, caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type,
+ u_int a_keylen, u_int flags,u_int32_t l_alloc, u_int32_t l_bytes,
+ u_int32_t l_addtime, u_int32_t l_usetime, u_int32_t seq)
{
struct sadb_msg *newmsg;
int len;
@@ -1276,11 +1188,8 @@ pfkey_send_x1(so, type, satype, mode, src, dst, spi, reqid, wsize,
/* sending SADB_DELETE or SADB_GET message to the kernel */
static int
-pfkey_send_x2(so, type, satype, mode, src, dst, spi)
- int so;
- u_int type, satype, mode;
- struct sockaddr *src, *dst;
- u_int32_t spi;
+pfkey_send_x2(int so, u_int type, u_int satype, u_int mode,
+ struct sockaddr *src, struct sockaddr *dst, u_int32_t spi)
{
struct sadb_msg *newmsg;
int len;
@@ -1363,9 +1272,7 @@ pfkey_send_x2(so, type, satype, mode, src, dst, spi)
* to the kernel
*/
static int
-pfkey_send_x3(so, type, satype)
- int so;
- u_int type, satype;
+pfkey_send_x3(int so, u_int type, u_int satype)
{
struct sadb_msg *newmsg;
int len;
@@ -1423,15 +1330,9 @@ pfkey_send_x3(so, type, satype)
/* sending SADB_X_SPDADD message to the kernel */
static int
-pfkey_send_x4(so, type, src, prefs, dst, prefd, proto,
- ltime, vtime, policy, policylen, seq)
- int so;
- struct sockaddr *src, *dst;
- u_int type, prefs, prefd, proto;
- u_int64_t ltime, vtime;
- char *policy;
- int policylen;
- u_int32_t seq;
+pfkey_send_x4(int so, u_int type, struct sockaddr *src, u_int prefs,
+ struct sockaddr *dst, u_int prefd, u_int proto, u_int64_t ltime,
+ u_int64_t vtime, char *policy, int policylen, u_int32_t seq)
{
struct sadb_msg *newmsg;
int len;
@@ -1517,10 +1418,7 @@ pfkey_send_x4(so, type, src, prefs, dst, prefd, proto,
/* sending SADB_X_SPDGET or SADB_X_SPDDELETE message to the kernel */
static int
-pfkey_send_x5(so, type, spid)
- int so;
- u_int type;
- u_int32_t spid;
+pfkey_send_x5(int so, u_int type, u_int32_t spid)
{
struct sadb_msg *newmsg;
struct sadb_x_policy xpl;
@@ -1573,7 +1471,7 @@ pfkey_send_x5(so, type, spid)
* others : success and return value of socket.
*/
int
-pfkey_open()
+pfkey_open(void)
{
int so;
const int bufsiz = 128 * 1024; /*is 128K enough?*/
@@ -1601,8 +1499,7 @@ pfkey_open()
* -1: fail.
*/
void
-pfkey_close(so)
- int so;
+pfkey_close(int so)
{
(void)close(so);
@@ -1620,8 +1517,7 @@ pfkey_close(so)
* XXX should be rewritten to pass length explicitly
*/
struct sadb_msg *
-pfkey_recv(so)
- int so;
+pfkey_recv(int so)
{
struct sadb_msg buf, *newmsg;
int len, reallen;
@@ -1678,10 +1574,7 @@ pfkey_recv(so)
* -1 : fail.
*/
int
-pfkey_send(so, msg, len)
- int so;
- struct sadb_msg *msg;
- int len;
+pfkey_send(int so, struct sadb_msg *msg, int len)
{
if ((len = send(so, (caddr_t)msg, len, 0)) < 0) {
__ipsec_set_strerror(strerror(errno));
@@ -1707,9 +1600,7 @@ pfkey_send(so, msg, len)
* XXX should be rewritten to obtain length explicitly
*/
int
-pfkey_align(msg, mhp)
- struct sadb_msg *msg;
- caddr_t *mhp;
+pfkey_align(struct sadb_msg *msg, caddr_t *mhp)
{
struct sadb_ext *ext;
int i;
@@ -1803,8 +1694,7 @@ pfkey_align(msg, mhp)
* 0: valid.
*/
int
-pfkey_check(mhp)
- caddr_t *mhp;
+pfkey_check(caddr_t *mhp)
{
struct sadb_msg *msg;
@@ -1915,13 +1805,8 @@ pfkey_check(mhp)
* `buf' must has been allocated sufficiently.
*/
static caddr_t
-pfkey_setsadbmsg(buf, lim, type, tlen, satype, seq, pid)
- caddr_t buf;
- caddr_t lim;
- u_int type, satype;
- u_int tlen;
- u_int32_t seq;
- pid_t pid;
+pfkey_setsadbmsg(caddr_t buf, caddr_t lim, u_int type, u_int tlen,
+ u_int satype, u_int32_t seq, pid_t pid)
{
struct sadb_msg *p;
u_int len;
@@ -1950,11 +1835,8 @@ pfkey_setsadbmsg(buf, lim, type, tlen, satype, seq, pid)
* `buf' must has been allocated sufficiently.
*/
static caddr_t
-pfkey_setsadbsa(buf, lim, spi, wsize, auth, enc, flags)
- caddr_t buf;
- caddr_t lim;
- u_int32_t spi, flags;
- u_int wsize, auth, enc;
+pfkey_setsadbsa(caddr_t buf, caddr_t lim, u_int32_t spi, u_int wsize,
+ u_int auth, u_int enc, u_int32_t flags)
{
struct sadb_sa *p;
u_int len;
@@ -1984,13 +1866,8 @@ pfkey_setsadbsa(buf, lim, spi, wsize, auth, enc, flags)
* prefixlen is in bits.
*/
static caddr_t
-pfkey_setsadbaddr(buf, lim, exttype, saddr, prefixlen, ul_proto)
- caddr_t buf;
- caddr_t lim;
- u_int exttype;
- struct sockaddr *saddr;
- u_int prefixlen;
- u_int ul_proto;
+pfkey_setsadbaddr(caddr_t buf, caddr_t lim, u_int exttype,
+ struct sockaddr *saddr, u_int prefixlen, u_int ul_proto)
{
struct sadb_address *p;
u_int len;
@@ -2018,11 +1895,8 @@ pfkey_setsadbaddr(buf, lim, exttype, saddr, prefixlen, ul_proto)
* OUT: the pointer of buf + len.
*/
static caddr_t
-pfkey_setsadbkey(buf, lim, type, key, keylen)
- caddr_t buf;
- caddr_t lim;
- caddr_t key;
- u_int type, keylen;
+pfkey_setsadbkey(caddr_t buf, caddr_t lim, u_int type, caddr_t key,
+ u_int keylen)
{
struct sadb_key *p;
u_int len;
@@ -2049,11 +1923,8 @@ pfkey_setsadbkey(buf, lim, type, key, keylen)
* OUT: the pointer of buf + len.
*/
static caddr_t
-pfkey_setsadblifetime(buf, lim, type, l_alloc, l_bytes, l_addtime, l_usetime)
- caddr_t buf;
- caddr_t lim;
- u_int type;
- u_int32_t l_alloc, l_bytes, l_addtime, l_usetime;
+pfkey_setsadblifetime(caddr_t buf, caddr_t lim, u_int type, u_int32_t l_alloc,
+ u_int32_t l_bytes, u_int32_t l_addtime, u_int32_t l_usetime)
{
struct sadb_lifetime *p;
u_int len;
@@ -2095,11 +1966,7 @@ pfkey_setsadblifetime(buf, lim, type, l_alloc, l_bytes, l_addtime, l_usetime)
* `buf' must has been allocated sufficiently.
*/
static caddr_t
-pfkey_setsadbxsa2(buf, lim, mode0, reqid)
- caddr_t buf;
- caddr_t lim;
- u_int32_t mode0;
- u_int32_t reqid;
+pfkey_setsadbxsa2(caddr_t buf, caddr_t lim, u_int32_t mode0, u_int32_t reqid)
{
struct sadb_x_sa2 *p;
u_int8_t mode = mode0 & 0xff;
View
19 lib/libipsec/pfkey_dump.c
@@ -206,8 +206,7 @@ static struct val2str str_alg_comp[] = {
* dump SADB_MSG formated. For debugging, you should use kdebug_sadb().
*/
void
-pfkey_sadump(m)
- struct sadb_msg *m;
+pfkey_sadump(struct sadb_msg *m)
{
caddr_t mhp[SADB_EXT_MAX + 1];
struct sadb_sa *m_sa;
@@ -365,8 +364,7 @@ pfkey_sadump(m)
}
void
-pfkey_spdump(m)
- struct sadb_msg *m;
+pfkey_spdump(struct sadb_msg *m)
{
char pbuf[NI_MAXSERV];
caddr_t mhp[SADB_EXT_MAX + 1];
@@ -484,8 +482,7 @@ pfkey_spdump(m)
* set "ipaddress" to buffer.
*/
static char *
-str_ipaddr(sa)
- struct sockaddr *sa;
+str_ipaddr(struct sockaddr *sa)
{
static char buf[NI_MAXHOST];
#ifdef NI_WITHSCOPEID
@@ -506,8 +503,7 @@ str_ipaddr(sa)
* set "/prefix[port number]" to buffer.
*/
static char *
-str_prefport(family, pref, port)
- u_int family, pref, port;
+str_prefport(u_int family, u_int pref, u_int port)
{
static char buf[128];
char prefbuf[128];
@@ -544,8 +540,7 @@ str_prefport(family, pref, port)
* set "Mon Day Time Year" to buffer
*/
static char *
-str_time(t)
- time_t t;
+str_time(time_t t)
{
static char buf[128];
@@ -564,9 +559,7 @@ str_time(t)
}
static void
-str_lifetime_byte(x, str)
- struct sadb_lifetime *x;
- char *str;
+str_lifetime_byte(struct sadb_lifetime *x, char *str)
{
double y;
char *unit;
View
2 lib/libpuffs/framebuf.c
@@ -96,7 +96,7 @@ getfiobyfd(struct puffs_usermount *pu, int fd)
}
struct puffs_framebuf *
-puffs_framebuf_make()
+puffs_framebuf_make(void)
{
struct puffs_framebuf *pufbuf;
View
5 libexec/ftpd/logwtmp.c
@@ -32,7 +32,6 @@
*
* @(#)logwtmp.c 8.1 (Berkeley) 6/4/93
* $FreeBSD: src/libexec/ftpd/logwtmp.c,v 1.9.2.2 2002/08/08 12:24:54 yar Exp $
- * $DragonFly: src/libexec/ftpd/logwtmp.c,v 1.2 2003/06/17 04:27:07 dillon Exp $
*/
#include <sys/types.h>
@@ -59,9 +58,7 @@ static int fd = -1;
* after login, but before logout).
*/
void
-ftpd_logwtmp(line, name, addr)
- char *line, *name;
- struct sockaddr *addr;
+ftpd_logwtmp(char *line, char *name, struct sockaddr *addr)
{
struct utmp ut;
struct stat buf;
View
14 libexec/rbootd/bpf.c
@@ -83,7 +83,7 @@ static u_int8_t *BpfPkt = NULL;
** If an error is encountered, the program terminates here.
*/
int
-BpfOpen()
+BpfOpen(void)
{
struct ifreq ifr;
char bpfdev[32];
@@ -212,8 +212,7 @@ BpfOpen()
** None.
*/
char *
-BpfGetIntfName(errmsg)
- char **errmsg;
+BpfGetIntfName(char **errmsg)
{
struct ifreq ibuf[8], *ifrp, *ifend, *mp;
struct ifconf ifc;
@@ -302,9 +301,7 @@ BpfGetIntfName(errmsg)
** None.
*/
int
-BpfRead(rconn, doread)
- RMPCONN *rconn;
- int doread;
+BpfRead(RMPCONN *rconn, int doread)
{
int datlen, caplen, hdrlen;
static u_int8_t *bp = NULL, *ep = NULL;
@@ -368,8 +365,7 @@ BpfRead(rconn, doread)
** None.
*/
int
-BpfWrite(rconn)
- RMPCONN *rconn;
+BpfWrite(RMPCONN *rconn)
{
if (write(BpfFd, (char *)&rconn->rmp, rconn->rmplen) < 0) {
syslog(LOG_ERR, "write: %s: %m", EnetStr(rconn));
@@ -392,7 +388,7 @@ BpfWrite(rconn)
** None.
*/
void
-BpfClose()
+BpfClose(void)
{
struct ifreq ifr;
View
8 libexec/rbootd/parseconf.c
@@ -45,7 +45,6 @@
*
* @(#)parseconf.c 8.1 (Berkeley) 6/4/93
* $FreeBSD: src/libexec/rbootd/parseconf.c,v 1.9.2.1 2001/03/05 11:17:52 kris Exp $
- * $DragonFly: src/libexec/rbootd/parseconf.c,v 1.3 2008/04/20 13:44:24 swildner Exp $
*/
#include <sys/param.h>
@@ -79,7 +78,7 @@
** to create a linked list of default boot files.
*/
int
-ParseConfig()
+ParseConfig(void)
{
FILE *fp;
CLIENT *client;
@@ -244,8 +243,7 @@ ParseConfig()
** be copied if it's to be saved.
*/
u_int8_t *
-ParseAddr(str)
- char *str;
+ParseAddr(char *str)
{
static u_int8_t addr[RMP_ADDRLEN];
char *cp;
@@ -308,7 +306,7 @@ ParseAddr(str)
** called to re-order it's list of boot file pointers.
*/
int
-GetBootFiles()
+GetBootFiles(void)
{
DIR *dfd;
struct stat statb;
View
24 libexec/rbootd/rbootd.c
@@ -46,7 +46,6 @@
* @(#) Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved.
* @(#)rbootd.c 8.1 (Berkeley) 6/4/93
* $FreeBSD: src/libexec/rbootd/rbootd.c,v 1.11.2.1 2001/02/18 02:54:11 kris Exp $
- * $DragonFly: src/libexec/rbootd/rbootd.c,v 1.4 2006/03/18 19:43:18 swildner Exp $
*/
#include <sys/param.h>
@@ -66,9 +65,7 @@
static void usage (void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int c, fd, omask, maxfds;
fd_set rset;
@@ -280,7 +277,7 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: rbootd [-ad] [-i interface] [config_file]\n");
exit (1);
@@ -299,7 +296,7 @@ usage()
** - Timed out connections in `RmpConns' will be freed.
*/
void
-DoTimeout()
+DoTimeout(void)
{
RMPCONN *rtmp;
struct timeval now;
@@ -336,8 +333,7 @@ DoTimeout()
*/
CLIENT *
-FindClient(rconn)
- RMPCONN *rconn;
+FindClient(RMPCONN *rconn)
{
CLIENT *ctmp;
@@ -362,8 +358,7 @@ FindClient(rconn)
** - This process ceases to exist.
*/
void
-Exit(sig)
- int sig;
+Exit(int sig)
{
if (sig > 0)
syslog(LOG_ERR, "going down on signal %d", sig);
@@ -391,8 +386,7 @@ Exit(sig)
** - This routine must be called with SIGHUP blocked.
*/
void
-ReConfig(signo)
- int signo;
+ReConfig(int signo)
{
syslog(LOG_NOTICE, "reconfiguring boot server");
@@ -418,8 +412,7 @@ ReConfig(signo)
** - Debug file is closed.
*/
void
-DebugOff(signo)
- int signo;
+DebugOff(int signo)
{
if (DbgFp != NULL)
(void) fclose(DbgFp);
@@ -441,8 +434,7 @@ DebugOff(signo)
** otherwise do nothing.
*/
void
-DebugOn(signo)
- int signo;
+DebugOn(int signo)
{
if (DbgFp == NULL) {
if ((DbgFp = fopen(DbgFile, "w")) == NULL)
View
26 libexec/rbootd/rmpproto.c
@@ -81,9 +81,7 @@
** sent to the host that sent the packet.
*/
void
-ProcessPacket(rconn, client)
- RMPCONN *rconn;
- CLIENT *client;
+ProcessPacket(RMPCONN *rconn, CLIENT *client)
{
struct rmp_packet *rmp;
RMPCONN *rconnout;
@@ -171,8 +169,7 @@ ProcessPacket(rconn, client)
** none.
*/
int
-SendServerID(rconn)
- RMPCONN *rconn;
+SendServerID(RMPCONN *rconn)
{
struct rmp_packet *rpl;
char *src, *dst;
@@ -223,10 +220,7 @@ SendServerID(rconn)
** none.
*/
int
-SendFileNo(req, rconn, filelist)
- struct rmp_packet *req;
- RMPCONN *rconn;
- char *filelist[];
+SendFileNo(struct rmp_packet *req, RMPCONN *rconn, char *filelist[])
{
struct rmp_packet *rpl;
char *src, *dst;
@@ -286,10 +280,7 @@ SendFileNo(req, rconn, filelist)
** none.
*/
int
-SendBootRepl(req, rconn, filelist)
- struct rmp_packet *req;
- RMPCONN *rconn;
- char *filelist[];
+SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, char *filelist[])
{
int retval;
char *filename, filepath[RMPBOOTDATA+1];
@@ -398,8 +389,7 @@ SendBootRepl(req, rconn, filelist)
** none.
*/
int
-SendReadRepl(rconn)
- RMPCONN *rconn;
+SendReadRepl(RMPCONN *rconn)
{
int retval = 0;
RMPCONN *oldconn;
@@ -516,8 +506,7 @@ SendReadRepl(rconn)
** none.
*/
int
-BootDone(rconn)
- RMPCONN *rconn;
+BootDone(RMPCONN *rconn)
{
RMPCONN *oldconn;
struct rmp_packet *rpl;
@@ -564,8 +553,7 @@ BootDone(rconn)
** none.
*/
int
-SendPacket(rconn)
- RMPCONN *rconn;
+SendPacket(RMPCONN *rconn)
{
/*
* Set Ethernet Destination address to Source (BPF and the enet
View
36 libexec/rbootd/utils.c
@@ -74,9 +74,7 @@
** None.
*/
void
-DispPkt(rconn, direct)
- RMPCONN *rconn;
- int direct;
+DispPkt(RMPCONN *rconn, int direct)
{
static char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u";
static char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n";
@@ -203,8 +201,7 @@ DispPkt(rconn, direct)
** be copied if it's to be saved.
*/
char *
-GetEtherAddr(addr)
- u_int8_t *addr;
+GetEtherAddr(u_int8_t *addr)
{
static char Hex[] = "0123456789abcdef";
static char etherstr[RMP_ADDRLEN*3];
@@ -244,9 +241,7 @@ GetEtherAddr(addr)
** - Characters are sent to `DbgFp'.
*/
void
-DspFlnm(size, flnm)
- u_int size;
- char *flnm;
+DspFlnm(u_int size, char *flnm)
{
int i;
@@ -271,8 +266,7 @@ DspFlnm(size, flnm)
** - If malloc() fails, a log message will be generated.
*/
CLIENT *
-NewClient(addr)
- u_int8_t *addr;
+NewClient(u_int8_t *addr)
{
CLIENT *ctmp;
@@ -304,7 +298,7 @@ NewClient(addr)
** - This routine must be called with SIGHUP blocked.
*/
void
-FreeClients()
+FreeClients(void)
{
CLIENT *ctmp;
@@ -329,8 +323,7 @@ FreeClients()
** - If malloc() fails, a log message will be generated.
*/
char *
-NewStr(str)
- char *str;
+NewStr(char *str)
{
char *stmp;
@@ -364,8 +357,7 @@ static RMPCONN *LastFree = NULL;
** - If malloc() fails, a log message will be generated.
*/
RMPCONN *
-NewConn(rconn)
- RMPCONN *rconn;
+NewConn(RMPCONN *rconn)
{
RMPCONN *rtmp;
@@ -405,8 +397,7 @@ NewConn(rconn)
** - File desc associated with `rtmp->bootfd' will be closed.
*/
void
-FreeConn(rtmp)
- RMPCONN *rtmp;
+FreeConn(RMPCONN *rtmp)
{
/*
* If the file descriptor is in use, close the file.
@@ -440,7 +431,7 @@ FreeConn(rtmp)
** - This routine must be called with SIGHUP blocked.
*/
void
-FreeConns()
+FreeConns(void)
{
RMPCONN *rtmp;
@@ -472,8 +463,7 @@ FreeConns()
** - This routine must be called with SIGHUP blocked.
*/
void
-AddConn(rconn)
- RMPCONN *rconn;
+AddConn(RMPCONN *rconn)
{
if (RmpConns != NULL)
rconn->next = RmpConns;
@@ -500,8 +490,7 @@ AddConn(rconn)
** - This routine must be called with SIGHUP blocked.
*/
RMPCONN *
-FindConn(rconn)
- RMPCONN *rconn;
+FindConn(RMPCONN *rconn)
{
RMPCONN *rtmp;
@@ -530,8 +519,7 @@ FindConn(rconn)
** - This routine must be called with SIGHUP blocked.
*/
void
-RemoveConn(rconn)
- RMPCONN *rconn;
+RemoveConn(RMPCONN *rconn)
{
RMPCONN *thisrconn, *lastrconn;
View
37 libexec/rpc.rstatd/rstat_proc.c
@@ -90,7 +90,7 @@ static int stat_is_init = 0;
#endif
void
-stat_init()
+stat_init(void)
{
stat_is_init = 1;
alarm(0);
@@ -100,9 +100,7 @@ stat_init()
}
statstime *
-rstatproc_stats_3_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rstatproc_stats_3_svc(void *argp, struct svc_req *rqstp)
{
if (! stat_is_init)
stat_init();
@@ -111,9 +109,7 @@ rstatproc_stats_3_svc(argp, rqstp)
}
statsswtch *
-rstatproc_stats_2_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rstatproc_stats_2_svc(void *argp, struct svc_req *rqstp)
{
if (! stat_is_init)
stat_init();
@@ -122,9 +118,7 @@ rstatproc_stats_2_svc(argp, rqstp)
}
stats *
-rstatproc_stats_1_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rstatproc_stats_1_svc(void *argp, struct svc_req *rqstp)
{
if (! stat_is_init)
stat_init();
@@ -133,9 +127,7 @@ rstatproc_stats_1_svc(argp, rqstp)
}
u_int *
-rstatproc_havedisk_3_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rstatproc_havedisk_3_svc(void *argp, struct svc_req *rqstp)
{
static u_int have;
@@ -147,23 +139,19 @@ rstatproc_havedisk_3_svc(argp, rqstp)
}
u_int *
-rstatproc_havedisk_2_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rstatproc_havedisk_2_svc(void *argp, struct svc_req *rqstp)
{
return(rstatproc_havedisk_3_svc(argp, rqstp));
}
u_int *
-rstatproc_havedisk_1_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rstatproc_havedisk_1_svc(void *argp, struct svc_req *rqstp)
{
return(rstatproc_havedisk_3_svc(argp, rqstp));
}
void
-updatestat()
+updatestat(void)
{
int i, hz;
struct clockinfo clockrate;
@@ -292,7 +280,7 @@ updatestat()
* returns true if have a disk
*/
int
-haveadisk()
+haveadisk(void)
{
register int i;
struct statinfo stats;
@@ -335,8 +323,7 @@ haveadisk()
}
void
-updatexfers(numdevs, devs)
- int numdevs, *devs;
+updatexfers(int numdevs, int *devs)
{
register int i, j, t;
struct statinfo stats;
@@ -396,9 +383,7 @@ updatexfers(numdevs, devs)
}
void
-rstat_service(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
+rstat_service(struct svc_req *rqstp, SVCXPRT *transp)
{
union {
int fill;
View
7 libexec/rpc.rstatd/rstatd.c
@@ -31,7 +31,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/libexec/rpc.rstatd/rstatd.c,v 1.8 1999/08/28 00:09:54 peter Exp $
- * $DragonFly: src/libexec/rpc.rstatd/rstatd.c,v 1.2 2003/06/17 04:27:07 dillon Exp $
*/
#include <stdlib.h>
@@ -47,7 +46,7 @@ int from_inetd = 1; /* started from inetd ? */
int closedown = 20; /* how long to wait before going dormant */
void
-cleanup()
+cleanup(int sig)
{
(void) pmap_unset(RSTATPROG, RSTATVERS_TIME);
(void) pmap_unset(RSTATPROG, RSTATVERS_SWTCH);
@@ -56,9 +55,7 @@ cleanup()
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
SVCXPRT *transp;
int sock = 0;
View
23 libexec/rpc.rusersd/rusers_proc.c
@@ -31,7 +31,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/libexec/rpc.rusersd/rusers_proc.c,v 1.10 1999/08/28 00:09:56 peter Exp $
- * $DragonFly: src/libexec/rpc.rusersd/rusers_proc.c,v 1.4 2007/11/25 01:28:23 swildner Exp $
*/
#ifdef DEBUG
@@ -236,7 +235,7 @@ do_names_2(int all)
}
int *
-rusers_num()
+rusers_num(void)
{
static int num_users = 0;
struct utmp usr;
@@ -286,41 +285,31 @@ do_names_1(int all)
}
utmpidlearr *
-rusersproc_names_2_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rusersproc_names_2_svc(void *argp, struct svc_req *rqstp)
{
return(do_names_2(0));
}
utmpidlearr *
-rusersproc_allnames_2_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rusersproc_allnames_2_svc(void *argp, struct svc_req *rqstp)
{
return(do_names_2(1));
}
utmparr *
-rusersproc_names_1_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rusersproc_names_1_svc(void *argp, struct svc_req *rqstp)
{
return(do_names_1(0));
}
utmparr *
-rusersproc_allnames_1_svc(argp, rqstp)
- void *argp;
- struct svc_req *rqstp;
+rusersproc_allnames_1_svc(void *argp, struct svc_req *rqstp)
{
return(do_names_1(1));
}
void
-rusers_service(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
+rusers_service(struct svc_req *rqstp, SVCXPRT *transp)
{
union {
int fill;
View
7 libexec/rpc.rusersd/rusersd.c
@@ -31,7 +31,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/libexec/rpc.rusersd/rusersd.c,v 1.8 1999/08/28 00:09:56 peter Exp $
- * $DragonFly: src/libexec/rpc.rusersd/rusersd.c,v 1.2 2003/06/17 04:27:07 dillon Exp $
*/
#include <stdlib.h>
@@ -48,7 +47,7 @@ extern void rusers_service();
int from_inetd = 1;
void
-cleanup()
+cleanup(int sig)
{
(void) pmap_unset(RUSERSPROG, RUSERSVERS_IDLE);
(void) pmap_unset(RUSERSPROG, RUSERSVERS_ORIG);
@@ -56,9 +55,7 @@ cleanup()
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
SVCXPRT *transp;
int sock = 0;
View
22 libexec/rpc.rwalld/rwalld.c
@@ -27,7 +27,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/libexec/rpc.rwalld/rwalld.c,v 1.8 1999/08/28 00:09:57 peter Exp $
- * $DragonFly: src/libexec/rpc.rwalld/rwalld.c,v 1.3 2003/11/14 03:54:31 dillon Exp $
*/
#include <err.h>
@@ -60,9 +59,7 @@ int nodaemon = 0;
int from_inetd = 1;
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
SVCXPRT *transp;
int s, salen;
@@ -133,26 +130,27 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: rpc.rwalld [-n]\n");
exit(1);
}
-void possess()
+void
+possess(void)
{
daemon(0, 0);
}
-void killkids()
+void
+killkids(void)
{
while(wait4(-1, NULL, WNOHANG, NULL) > 0)
;
}
-void *wallproc_wall_1_svc(s, rqstp)
- wrapstring *s;
- struct svc_req *rqstp;
+void *
+wallproc_wall_1_svc(wrapstring *s, struct svc_req *rqstp)
{
static void *dummy = NULL;
@@ -171,9 +169,7 @@ void *wallproc_wall_1_svc(s, rqstp)
}
void
-wallprog_1(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
+wallprog_1(struct svc_req *rqstp, SVCXPRT *transp)
{
union {
char *wallproc_wall_1_arg;
View
13 libexec/rpc.sprayd/sprayd.c
@@ -28,7 +28,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/libexec/rpc.sprayd/sprayd.c,v 1.5 1999/08/28 00:09:59 peter Exp $
- * $DragonFly: src/libexec/rpc.sprayd/sprayd.c,v 1.3 2003/11/14 03:54:31 dillon Exp $
*/
#include <rpc/rpc.h>
@@ -59,22 +58,20 @@ static int from_inetd = 1;
#define TIMEOUT 120
void
-cleanup()
+cleanup(int sig)
{
(void) pmap_unset(SPRAYPROG, SPRAYVERS);
exit(0);
}
void
-die()
+die(int sig)
{
exit(0);
}
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
SVCXPRT *transp;
int sock = 0;
@@ -126,9 +123,7 @@ main(argc, argv)
static void
-spray_service(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
+spray_service(struct svc_req *rqstp, SVCXPRT *transp)
{
static spraycumul scum;
static struct timeval clear, get;
View
4 libexec/telnetd/telnetd.c
@@ -397,8 +397,8 @@ main(int argc, char *argv[])
return(0);
} /* end of main */
- void
-usage()
+void
+usage(void)
{
fprintf(stderr, "usage: telnetd");
#ifdef AUTHENTICATION
View
5 libexec/telnetd/utility.c
@@ -32,7 +32,6 @@
*
* @(#)utility.c 8.4 (Berkeley) 5/30/95
* $FreeBSD: src/crypto/telnet/telnetd/utility.c,v 1.5.2.4 2002/04/13 10:59:09 markm Exp $
- * $DragonFly: src/crypto/telnet/telnetd/utility.c,v 1.2 2003/06/17 04:24:37 dillon Exp $
*/
#ifdef __FreeBSD__
@@ -63,8 +62,8 @@
* too full.
*/
- void
-ttloop()
+void
+ttloop(void)
{
DIAG(TD_REPORT, output_data("td: ttloop\r\n"));
View
3 sbin/mountd/mountd.c
@@ -2450,8 +2450,7 @@ huphandler(int sig)
got_sighup = 1;
}
-void terminate(sig)
-int sig;
+void terminate(int sig)
{
close(mountdlockfd);
unlink(MOUNTDLOCK);
View
7 usr.bin/locate/code/locate.code.c
@@ -35,7 +35,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/locate/code/locate.code.c,v 1.11.2.1 2001/03/04 08:46:46 kris Exp $
- * $DragonFly: src/usr.bin/locate/code/locate.code.c,v 1.4 2005/08/04 17:31:23 drhodus Exp $
*
* @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved.
* @(#)locate.code.c 8.1 (Berkeley) 6/6/93
@@ -116,9 +115,7 @@ int bgindex(char *);
void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
u_char *cp, *oldpath, *path;
int ch, code, count, diffcount, oldcount;
@@ -265,7 +262,7 @@ bgindex(bg) /* Return location of bg in bigrams or -1. */
#endif /* !LOOKUP */
void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"usage: locate.code common_bigrams < list > squozen_list\n");
View
16 usr.bin/locate/locate/fastfind.c
@@ -35,7 +35,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/locate/locate/fastfind.c,v 1.12.2.1 2001/02/22 13:28:52 wosch Exp $
- * $DragonFly: src/usr.bin/locate/locate/fastfind.c,v 1.3 2005/08/04 17:31:23 drhodus Exp $
*/
@@ -43,9 +42,7 @@
#define _LOCATE_STATISTIC_
void
-statistic (fp, path_fcodes)
- FILE *fp; /* open database */
- char *path_fcodes; /* for error message */
+statistic (FILE *fp, char *path_fcodes)
{
int lines, chars, size, big, zwerg;
u_char *p, *s;
@@ -114,11 +111,7 @@ fastfind_mmap_icase
#else
fastfind_mmap
#endif /* FF_ICASE */
-(pathpart, paddr, len, database)
- char *pathpart; /* search string */
- caddr_t paddr; /* mmap pointer */
- int len; /* length of database */
- char *database; /* for error message */
+(char *pathpart, caddr_t paddr, int len, char *database)
#else /* MMAP */
@@ -130,10 +123,7 @@ fastfind_icase
fastfind
#endif /* FF_ICASE */
-(fp, pathpart, database)
- FILE *fp; /* open database */
- char *pathpart; /* search string */
- char *database; /* for error message */
+(FILE *fp, char *pathpart, char *database)
#endif /* MMAP */
View
17 usr.bin/locate/locate/locate.c
@@ -37,7 +37,6 @@
* @(#) Copyright (c) 1995-1996 Wolfram Schneider, Berlin. @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved.
* @(#)locate.c 8.1 (Berkeley) 6/6/93
* $FreeBSD: src/usr.bin/locate/locate/locate.c,v 1.12.2.1 2001/03/04 08:47:25 kris Exp $
- * $DragonFly: src/usr.bin/locate/locate/locate.c,v 1.4 2003/11/06 19:30:04 eirikn Exp $
*/
/*
@@ -128,9 +127,7 @@ extern int check_bigram_char(int);
extern char *patprep(char *);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
register int ch;
char **dbv = NULL;
@@ -216,9 +213,7 @@ main(argc, argv)
void
-search_fopen(db, s)
- char *db; /* database */
- char **s; /* search strings */
+search_fopen(char *db, char **s)
{
FILE *fp;
#ifdef DEBUG
@@ -266,9 +261,7 @@ search_fopen(db, s)
#ifdef MMAP
void
-search_mmap(db, s)
- char *db; /* database */
- char **s; /* search strings */
+search_mmap(char *db, char **s)
{
struct stat sb;
int fd;
@@ -311,7 +304,7 @@ search_mmap(db, s)
#ifdef DEBUG
unsigned long
-cputime ()
+cputime (void)
{
struct rusage rus;
@@ -321,7 +314,7 @@ cputime ()
#endif /* DEBUG */
void
-usage ()
+usage (void)
{
(void)fprintf(stderr,
"usage: locate [-Scims] [-l limit] [-d database] pattern ...\n\n");
View
24 usr.bin/locate/locate/util.c
@@ -35,7 +35,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/locate/locate/util.c,v 1.6.2.1 2001/12/20 04:21:48 mikeh Exp $
- * $DragonFly: src/usr.bin/locate/locate/util.c,v 1.4 2005/08/04 17:31:23 drhodus Exp $
*/
@@ -60,8 +59,7 @@ int check_bigram_char(int);
* or the database is obviously not a locate database.
*/
int
-check_bigram_char(ch)
- int ch;
+check_bigram_char(int ch)
{
/* legal bigram: 0, ASCII_MIN ... ASCII_MAX */
if (ch == 0 ||
@@ -83,10 +81,7 @@ check_bigram_char(ch)
*
*/
char **
-colon(dbv, path, dot)
- char **dbv;
- char *path;
- char *dot; /* default for single ':' */
+colon(char **dbv, char *path, char *dot)
{
int vlen, slen;
char *c, *ch, *p;
@@ -137,8 +132,7 @@ colon(dbv, path, dot)
}
void
-print_matches(counter)
- u_int counter;
+print_matches(u_int counter)
{
(void)printf("%d\n", counter);
}
@@ -151,8 +145,7 @@ print_matches(counter)
static char globfree[100];
char *
-patprep(name)
- char *name;
+patprep(char *name)
{
char *endmark, *p, *subp;
@@ -205,8 +198,7 @@ patprep(name)
/* tolower word */
u_char *
-tolower_word(word)
- u_char *word;
+tolower_word(u_char *word)
{
u_char *p;
@@ -228,8 +220,7 @@ tolower_word(word)
*/
int
-getwm(p)
- caddr_t p;
+getwm(caddr_t p)
{
static char buf[INTSIZE];
int i;
@@ -257,8 +248,7 @@ getwm(p)
*/
int
-getwf(fp)
- FILE *fp;
+getwf(FILE *fp)
{
int word;
View
6 usr.bin/telnet/ring.c
@@ -32,7 +32,6 @@
*
* @(#)ring.c 8.2 (Berkeley) 5/30/95
* $FreeBSD: src/crypto/telnet/telnet/ring.c,v 1.2.8.2 2002/04/13 10:59:08 markm Exp $
- * $DragonFly: src/crypto/telnet/telnet/ring.c,v 1.2 2003/06/17 04:24:37 dillon Exp $
*/
/*
@@ -306,9 +305,8 @@ ring_encrypt(Ring *ring, void (*encryptor)(unsigned char *, int))
ring->clearto = ring->supply;
}
- void
-ring_clearto(ring)
- Ring *ring;
+void
+ring_clearto(Ring *ring)
{
if (!ring_empty(ring))
ring->clearto = ring->supply;
View
2 usr.sbin/puffs/mount_psshfs/psbuf.c
@@ -186,7 +186,7 @@ psbuf_cmp(struct puffs_usermount *pu,
}
struct puffs_framebuf *
-psbuf_makeout()
+psbuf_makeout(void)
{
struct puffs_framebuf *pb;
View
2 usr.sbin/puffs/mount_psshfs/psshfs.c
@@ -82,7 +82,7 @@ add_ssharg(char ***sshargs, int *nargs, const char *arg)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: %s "
View
10 usr.sbin/setkey/token.l
@@ -1,5 +1,4 @@
/* $FreeBSD: src/usr.sbin/setkey/token.l,v 1.2.2.3 2001/07/03 11:02:17 ume Exp $ */
-/* $DragonFly: src/usr.sbin/setkey/token.l,v 1.4 2008/06/05 18:06:33 swildner Exp $ */
/* $KAME: token.l,v 1.21 2001/05/18 05:35:01 sakane Exp $ */
/*
@@ -296,23 +295,20 @@ any { PREPROC; return(ANY); }
%%
void
-yyfatal(s)
- const char *s;
+yyfatal(const char *s)
{
yyerror(s);
exit(1);
}
void
-yyerror(s)
- const char *s;
+yyerror(const char *s)
{
printf("line %d: %s at [%s]\n", lineno, s, yytext);
}
int
-parse(fp)
- FILE **fp;
+parse(FILE **fp)
{
yyin = *fp;

0 comments on commit 89a8909

Please sign in to comment.
Something went wrong with that request. Please try again.