diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-09-28 21:01:36 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-09-28 21:01:36 +0000 |
commit | a2e41a585b3a8a54e09831ea476ccaa56142c1ae (patch) | |
tree | 5eb1c382253dd1c07e0f9c4840d83d196b59b21f /include | |
parent | 409dae262ffce0647ceb196193a34ad11e1e1edd (diff) | |
download | src-a2e41a585b3a8a54e09831ea476ccaa56142c1ae.tar.gz src-a2e41a585b3a8a54e09831ea476ccaa56142c1ae.zip |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/rpc/auth.h | 11 |
1 files changed, 6 insertions, 5 deletions
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 |