From 34ecf97a64ad33b7671d61a495f4361c586952bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 12 Jun 2009 23:39:05 +0000 Subject: [PATCH] Provide correct prototypes for functions with no arguments. MFC after: 1 week --- usr.sbin/nscd/agent.c | 2 +- usr.sbin/nscd/agent.h | 4 ++-- usr.sbin/nscd/agents/group.c | 8 ++++---- usr.sbin/nscd/agents/group.h | 4 ++-- usr.sbin/nscd/agents/passwd.c | 8 ++++---- usr.sbin/nscd/agents/passwd.h | 4 ++-- usr.sbin/nscd/agents/services.c | 8 ++++---- usr.sbin/nscd/agents/services.h | 4 ++-- usr.sbin/nscd/cacheplcs.c | 10 +++++----- usr.sbin/nscd/cacheplcs.h | 8 ++++---- usr.sbin/nscd/debug.c | 4 ++-- usr.sbin/nscd/debug.h | 4 ++-- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/usr.sbin/nscd/agent.c b/usr.sbin/nscd/agent.c index a193f953814c..d53c7ba92d32 100644 --- a/usr.sbin/nscd/agent.c +++ b/usr.sbin/nscd/agent.c @@ -55,7 +55,7 @@ agent_cmp_func(const void *a1, const void *a2) } struct agent_table * -init_agent_table() +init_agent_table(void) { struct agent_table *retval; diff --git a/usr.sbin/nscd/agent.h b/usr.sbin/nscd/agent.h index ebe8974ee2a1..e10901ee38fb 100644 --- a/usr.sbin/nscd/agent.h +++ b/usr.sbin/nscd/agent.h @@ -53,7 +53,7 @@ struct common_agent { struct multipart_agent { struct agent parent; - void *(*mp_init_func)(); + void *(*mp_init_func)(void); int (*mp_lookup_func)(char **, size_t *, void *); void (*mp_destroy_func)(void *); }; @@ -63,7 +63,7 @@ struct agent_table { size_t agents_num; }; -extern struct agent_table *init_agent_table(); +extern struct agent_table *init_agent_table(void); extern void register_agent(struct agent_table *, struct agent *); extern struct agent *find_agent(struct agent_table *, const char *, enum agent_type); diff --git a/usr.sbin/nscd/agents/group.c b/usr.sbin/nscd/agents/group.c index ba61db7f56f9..2ac061923504 100644 --- a/usr.sbin/nscd/agents/group.c +++ b/usr.sbin/nscd/agents/group.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); static int group_marshal_func(struct group *, char *, size_t *); static int group_lookup_func(const char *, size_t, char **, size_t *); -static void *group_mp_init_func(); +static void *group_mp_init_func(void); static int group_mp_lookup_func(char **, size_t *, void *); static void group_mp_destroy_func(void *); @@ -184,7 +184,7 @@ group_lookup_func(const char *key, size_t key_size, char **buffer, } static void * -group_mp_init_func() +group_mp_init_func(void) { TRACE_IN(group_mp_init_func); setgrent(); @@ -219,7 +219,7 @@ group_mp_destroy_func(void *mdata) } struct agent * -init_group_agent() +init_group_agent(void) { struct common_agent *retval; @@ -238,7 +238,7 @@ init_group_agent() } struct agent * -init_group_mp_agent() +init_group_mp_agent(void) { struct multipart_agent *retval; diff --git a/usr.sbin/nscd/agents/group.h b/usr.sbin/nscd/agents/group.h index e6c73973f1d2..6a7822d42e79 100644 --- a/usr.sbin/nscd/agents/group.h +++ b/usr.sbin/nscd/agents/group.h @@ -28,5 +28,5 @@ #include "../agent.h" -extern struct agent *init_group_agent(); -extern struct agent *init_group_mp_agent(); +extern struct agent *init_group_agent(void); +extern struct agent *init_group_mp_agent(void); diff --git a/usr.sbin/nscd/agents/passwd.c b/usr.sbin/nscd/agents/passwd.c index b068d1992fed..9039febbb2f7 100644 --- a/usr.sbin/nscd/agents/passwd.c +++ b/usr.sbin/nscd/agents/passwd.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); static int passwd_marshal_func(struct passwd *, char *, size_t *); static int passwd_lookup_func(const char *, size_t, char **, size_t *); -static void *passwd_mp_init_func(); +static void *passwd_mp_init_func(void); static int passwd_mp_lookup_func(char **, size_t *, void *); static void passwd_mp_destroy_func(void *mdata); @@ -191,7 +191,7 @@ passwd_lookup_func(const char *key, size_t key_size, char **buffer, } static void * -passwd_mp_init_func() +passwd_mp_init_func(void) { TRACE_IN(passwd_mp_init_func); setpwent(); @@ -226,7 +226,7 @@ passwd_mp_destroy_func(void *mdata) } struct agent * -init_passwd_agent() +init_passwd_agent(void) { struct common_agent *retval; @@ -245,7 +245,7 @@ init_passwd_agent() } struct agent * -init_passwd_mp_agent() +init_passwd_mp_agent(void) { struct multipart_agent *retval; diff --git a/usr.sbin/nscd/agents/passwd.h b/usr.sbin/nscd/agents/passwd.h index 956a50d78008..ace572e6297e 100644 --- a/usr.sbin/nscd/agents/passwd.h +++ b/usr.sbin/nscd/agents/passwd.h @@ -28,5 +28,5 @@ #include "../agent.h" -extern struct agent *init_passwd_agent(); -extern struct agent *init_passwd_mp_agent(); +extern struct agent *init_passwd_agent(void); +extern struct agent *init_passwd_mp_agent(void); diff --git a/usr.sbin/nscd/agents/services.c b/usr.sbin/nscd/agents/services.c index 44dec39c3d25..f1f52d0a304a 100644 --- a/usr.sbin/nscd/agents/services.c +++ b/usr.sbin/nscd/agents/services.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); static int services_marshal_func(struct servent *, char *, size_t *); static int services_lookup_func(const char *, size_t, char **, size_t *); -static void *services_mp_init_func(); +static void *services_mp_init_func(void); static int services_mp_lookup_func(char **, size_t *, void *); static void services_mp_destroy_func(void *); @@ -205,7 +205,7 @@ services_lookup_func(const char *key, size_t key_size, char **buffer, } static void * -services_mp_init_func() +services_mp_init_func(void) { TRACE_IN(services_mp_init_func); setservent(0); @@ -240,7 +240,7 @@ services_mp_destroy_func(void *mdata) } struct agent * -init_services_agent() +init_services_agent(void) { struct common_agent *retval; TRACE_IN(init_services_agent); @@ -259,7 +259,7 @@ init_services_agent() } struct agent * -init_services_mp_agent() +init_services_mp_agent(void) { struct multipart_agent *retval; diff --git a/usr.sbin/nscd/agents/services.h b/usr.sbin/nscd/agents/services.h index 0b77c87a9979..00535c42a260 100644 --- a/usr.sbin/nscd/agents/services.h +++ b/usr.sbin/nscd/agents/services.h @@ -28,5 +28,5 @@ #include "../agent.h" -extern struct agent *init_services_agent(); -extern struct agent *init_services_mp_agent(); +extern struct agent *init_services_agent(void); +extern struct agent *init_services_mp_agent(void); diff --git a/usr.sbin/nscd/cacheplcs.c b/usr.sbin/nscd/cacheplcs.c index 7b0c8eb5531a..7010ce8fc945 100644 --- a/usr.sbin/nscd/cacheplcs.c +++ b/usr.sbin/nscd/cacheplcs.c @@ -55,7 +55,7 @@ static void cache_lru_policy_update_item(struct cache_policy_ *, struct cache_policy_item_ *); static void cache_queue_policy_add_item(struct cache_policy_ *, struct cache_policy_item_ *); -static struct cache_policy_item_ * cache_queue_policy_create_item(); +static struct cache_policy_item_ * cache_queue_policy_create_item(void); static void cache_queue_policy_destroy_item(struct cache_policy_item_ *); static struct cache_policy_item_ *cache_queue_policy_get_first_item( struct cache_policy_ *); @@ -77,7 +77,7 @@ static struct cache_queue_policy_ *init_cache_queue_policy(void); * cache_queue_policy_ with cache_update_item function changed. */ static struct cache_policy_item_ * -cache_queue_policy_create_item() +cache_queue_policy_create_item(void) { struct cache_queue_policy_item_ *retval; @@ -248,7 +248,7 @@ cache_fifo_policy_update_item(struct cache_policy_ *policy, } struct cache_policy_ * -init_cache_fifo_policy() +init_cache_fifo_policy(void) { struct cache_queue_policy_ *retval; @@ -293,7 +293,7 @@ cache_lru_policy_update_item(struct cache_policy_ *policy, } struct cache_policy_ * -init_cache_lru_policy() +init_cache_lru_policy(void) { struct cache_queue_policy_ *retval; @@ -530,7 +530,7 @@ cache_lfu_policy_get_prev_item(struct cache_policy_ *policy, * functions pointers */ struct cache_policy_ * -init_cache_lfu_policy() +init_cache_lfu_policy(void) { int i; struct cache_lfu_policy_ *retval; diff --git a/usr.sbin/nscd/cacheplcs.h b/usr.sbin/nscd/cacheplcs.h index 8eba15fee356..65b3230d7711 100644 --- a/usr.sbin/nscd/cacheplcs.h +++ b/usr.sbin/nscd/cacheplcs.h @@ -59,7 +59,7 @@ struct cache_policy_item_ */ struct cache_policy_ { - struct cache_policy_item_* (*create_item_func)(); + struct cache_policy_item_* (*create_item_func)(void); void (*destroy_item_func)(struct cache_policy_item_ *); void (*add_item_func)(struct cache_policy_ *, @@ -123,15 +123,15 @@ typedef struct cache_queue_policy_ cache_fifo_policy_; typedef struct cache_queue_policy_ cache_lru_policy_; /* fifo policy routines */ -extern struct cache_policy_ *init_cache_fifo_policy(); +extern struct cache_policy_ *init_cache_fifo_policy(void); extern void destroy_cache_fifo_policy(struct cache_policy_ *); /* lru policy routines */ -extern struct cache_policy_ *init_cache_lru_policy(); +extern struct cache_policy_ *init_cache_lru_policy(void); extern void destroy_cache_lru_policy(struct cache_policy_ *); /* lfu policy routines */ -extern struct cache_policy_ *init_cache_lfu_policy(); +extern struct cache_policy_ *init_cache_lfu_policy(void); extern void destroy_cache_lfu_policy(struct cache_policy_ *); #endif diff --git a/usr.sbin/nscd/debug.c b/usr.sbin/nscd/debug.c index 420c517c1159..997590c66503 100644 --- a/usr.sbin/nscd/debug.c +++ b/usr.sbin/nscd/debug.c @@ -135,14 +135,14 @@ __trace_out(const char *s, const char *f, int l) } void -__trace_on() +__trace_on(void) { trace_level = trace_level_bk; trace_level_bk = 0; } void -__trace_off() +__trace_off(void) { trace_level_bk = trace_level; trace_level = 1024; diff --git a/usr.sbin/nscd/debug.h b/usr.sbin/nscd/debug.h index 71f530088d02..91649e640064 100644 --- a/usr.sbin/nscd/debug.h +++ b/usr.sbin/nscd/debug.h @@ -61,7 +61,7 @@ extern void __trace_ptr(const char *, const void *, const char *, int); extern void __trace_int(const char *, int, const char *, int); extern void __trace_str(const char *, const char *, const char *, int); extern void __trace_out(const char *, const char *, int); -extern void __trace_on(); -extern void __trace_off(); +extern void __trace_on(void); +extern void __trace_off(void); #endif