aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-10-31 11:44:10 +0000
committerStefan Eßer <se@FreeBSD.org>2020-10-31 11:44:10 +0000
commitd86926912c7bbeb13c068ae7a426b29b68360f15 (patch)
tree4a9df4f5d20a2e94315a3fdf32d862714b0673ba /lib
parentd8e59012e29dee301a7af5c2a70749637319fafc (diff)
downloadsrc-d86926912c7bbeb13c068ae7a426b29b68360f15.tar.gz
src-d86926912c7bbeb13c068ae7a426b29b68360f15.zip
Fix style, no functional change
Submitted by: kib MFC after: 3 days
Notes
Notes: svn path=/head/; revision=367196
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/sysctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
index 4495010332c8..3b7de5c0ea31 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)) {