git: 308fc7e5b15a - main - user_getpeername: Use 'bool' for the compat argument.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Jan 2022 17:52:46 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=308fc7e5b15a4cb5a96cec84f8d76f45a3c081dd commit 308fc7e5b15a4cb5a96cec84f8d76f45a3c081dd Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-01-24 17:51:35 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-01-24 17:51:35 +0000 user_getpeername: Use 'bool' for the compat argument. This matches user_getsockname. Reviewed by: brooks, kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33987 --- sys/kern/uipc_syscalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 0e083e058916..766c68b35cfe 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1419,7 +1419,7 @@ ogetsockname(struct thread *td, struct ogetsockname_args *uap) static int user_getpeername(struct thread *td, int fdes, struct sockaddr *asa, - socklen_t *alen, int compat) + socklen_t *alen, bool compat) { struct sockaddr *sa; socklen_t len; @@ -1493,14 +1493,14 @@ done: int sys_getpeername(struct thread *td, struct getpeername_args *uap) { - return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, 0)); + return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, false)); } #ifdef COMPAT_OLDSOCK int ogetpeername(struct thread *td, struct ogetpeername_args *uap) { - return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, 1)); + return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, true)); } #endif /* COMPAT_OLDSOCK */