From a2e41a585b3a8a54e09831ea476ccaa56142c1ae Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 28 Sep 2022 14:01:36 -0700 Subject: libc rpc: Fix mismatches in prototypes for array bounds. Various RPC functions used a bare pointer in function prototypes to describe fixed-length buffer arguments but used a fixed-length array in the function definition. The manual page for these functions describes the parameters as being fixed-length buffers, so update the prototypes to match the definitions. Reviewed by: imp, emaste Reported by: GCC -Warray-parameter Differential Revision: https://reviews.freebsd.org/D36757 --- include/rpc/auth.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/rpc/auth.h b/include/rpc/auth.h index bf0d76c046c6..8773e7115d12 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -279,11 +279,12 @@ __END_DECLS * Netname manipulation routines. */ __BEGIN_DECLS -extern int getnetname(char *); -extern int host2netname(char *, const char *, const char *); -extern int user2netname(char *, const uid_t, const char *); -extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *); -extern int netname2host(char *, char *, const int); +extern int getnetname(char [MAXNETNAMELEN + 1]); +extern int host2netname(char [MAXNETNAMELEN + 1], const char *, const char *); +extern int user2netname(char [MAXNETNAMELEN + 1], const uid_t, const char *); +extern int netname2user(char [MAXNETNAMELEN + 1], uid_t *, gid_t *, int *, + gid_t *); +extern int netname2host(char [MAXNETNAMELEN + 1], char *, const int); extern void passwd2des ( char *, char * ); __END_DECLS -- cgit v1.3