From f65eac0fc063462e85aed6fbbeabcbb2a95fea33 Mon Sep 17 00:00:00 2001 From: Pawel Biernacki Date: Wed, 15 Apr 2020 16:55:38 +0000 Subject: [PATCH] sysctl_handle_string: Put logical or in parentheses. Reported by: rdivacky Approved by: kib (mentor) Pointy-hat to: kaktus --- sys/kern/kern_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index db23046d0ea..1be418e1757 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1655,7 +1655,7 @@ sysctl_handle_string(SYSCTL_HANDLER_ARGS) * string. In ddb, don't worry about trying to make a malloced * snapshot. */ - if ((oidp->oid_kind & CTLFLAG_WR | CTLFLAG_TUN) == 0 || arg2 == 0 + if ((oidp->oid_kind & (CTLFLAG_WR | CTLFLAG_TUN)) == 0 || arg2 == 0 || kdb_active) { arg2 = strlen((char *)arg1) + 1; ro_string = 1;