Use strict prototypes
Function declarations with no argument declare functions taking an arbitrary number of arguments. Use the special type void to declare functions taking no argument.
This commit is contained in:
parent
f84b8530c5
commit
45bba0e190
@ -29,7 +29,7 @@ bool nss_is_initialized() {
|
||||
return atomic_load(&nss_init_completed);
|
||||
}
|
||||
|
||||
static void nss_exit() {
|
||||
static void nss_exit(void) {
|
||||
if (nss_is_initialized() && subid_nss) {
|
||||
dlclose(subid_nss->handle);
|
||||
free(subid_nss);
|
||||
|
@ -164,7 +164,7 @@ extern int getrange (char *range,
|
||||
unsigned long *max, bool *has_max);
|
||||
|
||||
/* gettime.c */
|
||||
extern time_t gettime ();
|
||||
extern time_t gettime (void);
|
||||
|
||||
/* get_uid.c */
|
||||
extern int get_uid (const char *uidstr, uid_t *uid);
|
||||
@ -243,7 +243,7 @@ extern /*@null@*//*@only@*/struct passwd *get_my_pwent (void);
|
||||
/* nss.c */
|
||||
#include <libsubid/subid.h>
|
||||
extern void nss_init(char *nsswitch_path);
|
||||
extern bool nss_is_initialized();
|
||||
extern bool nss_is_initialized(void);
|
||||
|
||||
struct subid_nss_ops {
|
||||
/*
|
||||
@ -293,7 +293,7 @@ struct subid_nss_ops {
|
||||
void *handle;
|
||||
};
|
||||
|
||||
extern struct subid_nss_ops *get_subid_nss_handle();
|
||||
extern struct subid_nss_ops *get_subid_nss_handle(void);
|
||||
|
||||
|
||||
/* pam_pass_non_interactive.c */
|
||||
@ -324,12 +324,12 @@ extern struct passwd *prefix_getpwuid(uid_t uid);
|
||||
extern struct passwd *prefix_getpwnam(const char* name);
|
||||
extern struct spwd *prefix_getspnam(const char* name);
|
||||
extern struct group *prefix_getgr_nam_gid(const char *grname);
|
||||
extern void prefix_setpwent();
|
||||
extern struct passwd* prefix_getpwent();
|
||||
extern void prefix_endpwent();
|
||||
extern void prefix_setgrent();
|
||||
extern struct group* prefix_getgrent();
|
||||
extern void prefix_endgrent();
|
||||
extern void prefix_setpwent(void);
|
||||
extern struct passwd* prefix_getpwent(void);
|
||||
extern void prefix_endpwent(void);
|
||||
extern void prefix_setgrent(void);
|
||||
extern struct group* prefix_getgrent(void);
|
||||
extern void prefix_endgrent(void);
|
||||
|
||||
/* pwd2spwd.c */
|
||||
#ifndef USE_PAM
|
||||
|
@ -248,7 +248,7 @@ extern struct spwd *prefix_getspnam(const char* name)
|
||||
}
|
||||
}
|
||||
|
||||
extern void prefix_setpwent()
|
||||
extern void prefix_setpwent(void)
|
||||
{
|
||||
if (!passwd_db_file) {
|
||||
setpwent();
|
||||
@ -261,7 +261,7 @@ extern void prefix_setpwent()
|
||||
if (!fp_pwent)
|
||||
return;
|
||||
}
|
||||
extern struct passwd* prefix_getpwent()
|
||||
extern struct passwd* prefix_getpwent(void)
|
||||
{
|
||||
if (!passwd_db_file) {
|
||||
return getpwent();
|
||||
@ -271,7 +271,7 @@ extern struct passwd* prefix_getpwent()
|
||||
}
|
||||
return fgetpwent(fp_pwent);
|
||||
}
|
||||
extern void prefix_endpwent()
|
||||
extern void prefix_endpwent(void)
|
||||
{
|
||||
if (!passwd_db_file) {
|
||||
endpwent();
|
||||
@ -282,7 +282,7 @@ extern void prefix_endpwent()
|
||||
fp_pwent = NULL;
|
||||
}
|
||||
|
||||
extern void prefix_setgrent()
|
||||
extern void prefix_setgrent(void)
|
||||
{
|
||||
if (!group_db_file) {
|
||||
setgrent();
|
||||
@ -295,14 +295,14 @@ extern void prefix_setgrent()
|
||||
if (!fp_grent)
|
||||
return;
|
||||
}
|
||||
extern struct group* prefix_getgrent()
|
||||
extern struct group* prefix_getgrent(void)
|
||||
{
|
||||
if (!group_db_file) {
|
||||
return getgrent();
|
||||
}
|
||||
return fgetgrent(fp_grent);
|
||||
}
|
||||
extern void prefix_endgrent()
|
||||
extern void prefix_endgrent(void)
|
||||
{
|
||||
if (!group_db_file) {
|
||||
endgrent();
|
||||
|
Loading…
Reference in New Issue
Block a user