Date: Sat, 31 Oct 2020 11:44:11 +0000 (UTC) From: =?UTF-8?Q?Stefan_E=c3=9fer?= <se@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367196 - head/lib/libc/gen Message-ID: <202010311144.09VBiBbh063210@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: se Date: Sat Oct 31 11:44:10 2020 New Revision: 367196 URL: https://svnweb.freebsd.org/changeset/base/367196 Log: Fix style, no functional change Submitted by: kib MFC after: 3 days Modified: head/lib/libc/gen/sysctl.c Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Sat Oct 31 03:36:31 2020 (r367195) +++ head/lib/libc/gen/sysctl.c Sat Oct 31 11:44:10 2020 (r367196) @@ -79,23 +79,23 @@ sysctl(const int *name, u_int namelen, void *oldp, siz switch (name[1]) { case USER_CS_PATH: - if (oldp && orig_oldlen < sizeof(_PATH_STDPATH)) { + if (oldp == NULL && orig_oldlen < sizeof(_PATH_STDPATH)) { errno = ENOMEM; - return -1; + return (-1); } *oldlenp = sizeof(_PATH_STDPATH); if (oldp != NULL) memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); return (0); case USER_LOCALBASE: - if (oldp && orig_oldlen < sizeof(_PATH_LOCALBASE)) { + if (oldp == NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) { errno = ENOMEM; - return -1; + return (-1); } *oldlenp = sizeof(_PATH_LOCALBASE); if (oldp != NULL) memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); - return(0); + return (0); } if (oldp && *oldlenp < sizeof(int)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010311144.09VBiBbh063210>