From a096270c77b1f6461a2ef58660ad9cfa9cbb32bb Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sat, 8 Apr 2023 01:03:31 -0400 Subject: Further modernize Hurd code by enforcing strict prototypes and no implicit function declarations. Most of the changes land in one of these buckets: * Removed unused declarations. * Used (void) to represent no parameters instead of () which means an undeterminate number of parameters. * Included missing header files whenever necessary (stdlib.h, sys/mman.h, etc) * Typedefed function pointers to be able to fully declare the parameter types. * Added declarations of library functions that are used elsewhere (example is libps/ps.h). * Made functions static whenever they are only used in that file. * Forwarded declarations of some methods that were made static. Message-Id: --- libshouldbeinlibc/idvec-verify.c | 12 +++++++++++- libshouldbeinlibc/ugids.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'libshouldbeinlibc') diff --git a/libshouldbeinlibc/idvec-verify.c b/libshouldbeinlibc/idvec-verify.c index 1c4bc494..64d3c573 100644 --- a/libshouldbeinlibc/idvec-verify.c +++ b/libshouldbeinlibc/idvec-verify.c @@ -36,7 +36,17 @@ #define SHADOW_PASSWORD_STRING "x" /* pw_passwd contents for shadow passwd */ -static error_t verify_id (); /* FWD */ +/* Forward declaration */ +static error_t +verify_id (uid_t id, int is_group, int multiple, + char *(*getpass_fn) (const char *prompt, + uid_t id, int is_group, + void *pwd_or_grp, void *hook), + void *getpass_hook, + error_t (*verify_fn) (const char *password, + uid_t id, int is_group, + void *pwd_or_grp, void *hook), + void *verify_hook); /* Get a password from the user, returning it in malloced storage. */ static char * diff --git a/libshouldbeinlibc/ugids.h b/libshouldbeinlibc/ugids.h index 5d0e1134..37a8668f 100644 --- a/libshouldbeinlibc/ugids.h +++ b/libshouldbeinlibc/ugids.h @@ -50,7 +50,7 @@ struct ugids #define UGIDS_INIT { IDVEC_INIT, IDVEC_INIT, IDVEC_INIT, IDVEC_INIT, IDVEC_INIT, IDVEC_INIT } /* Return a new ugids structure, or 0 if an allocation error occurs. */ -struct ugids *make_ugids (); +struct ugids *make_ugids (void); extern void ugids_fini (struct ugids *ugids); -- cgit v1.2.3