summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-10-31 12:10:43 +0000
committerStefan Eßer <se@FreeBSD.org>2020-10-31 12:10:43 +0000
commit3b9795a2e83352d61ca9a1b8746e2ee412d5d93d (patch)
tree5107d1c8737c285aab9d476d2e87e88b8556c990 /lib
parentd86926912c7bbeb13c068ae7a426b29b68360f15 (diff)
downloadsrc-test2-3b9795a2e83352d61ca9a1b8746e2ee412d5d93d.tar.gz
src-test2-3b9795a2e83352d61ca9a1b8746e2ee412d5d93d.zip
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
index 3b7de5c0ea31..ac6140013038 100644
--- a/lib/libc/gen/sysctl.c
+++ b/lib/libc/gen/sysctl.c
@@ -79,7 +79,7 @@ sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp,
switch (name[1]) {
case USER_CS_PATH:
- if (oldp == NULL && orig_oldlen < sizeof(_PATH_STDPATH)) {
+ if (oldp != NULL && orig_oldlen < sizeof(_PATH_STDPATH)) {
errno = ENOMEM;
return (-1);
}
@@ -88,7 +88,7 @@ sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp,
memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH));
return (0);
case USER_LOCALBASE:
- if (oldp == NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) {
+ if (oldp != NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) {
errno = ENOMEM;
return (-1);
}