diff options
author | se <se@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f> | 2020-10-31 11:44:10 +0000 |
---|---|---|
committer | se <se@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f> | 2020-10-31 11:44:10 +0000 |
commit | 9e52a6c84f1b282f46ce99377818a5faf99ce345 (patch) | |
tree | 4a9df4f5d20a2e94315a3fdf32d862714b0673ba | |
parent | c2da431d9e470e92d3cb5a2021e0955422802827 (diff) | |
download | freebsd-9e52a6c84f1b282f46ce99377818a5faf99ce345.tar.gz freebsd-9e52a6c84f1b282f46ce99377818a5faf99ce345.tar.bz2 |
Fix style, no functional change
Submitted by: kib
MFC after: 3 days
git-svn-id: http://svn.freebsd.org/base/head@367196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
-rw-r--r-- | lib/libc/gen/sysctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c index 4495010332c..3b7de5c0ea3 100644 --- a/lib/libc/gen/sysctl.c +++ b/lib/libc/gen/sysctl.c @@ -79,23 +79,23 @@ sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, 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)) { |