svn commit: r359976 - head/sys/kern

Pawel Biernacki kaktus at FreeBSD.org
Wed Apr 15 16:55:39 UTC 2020


Author: kaktus
Date: Wed Apr 15 16:55:38 2020
New Revision: 359976
URL: https://svnweb.freebsd.org/changeset/base/359976

Log:
  sysctl_handle_string: Put logical or in parentheses.
  
  Reported by:	rdivacky
  Approved by:	kib (mentor)
  Pointy-hat to:	kaktus

Modified:
  head/sys/kern/kern_sysctl.c

Modified: head/sys/kern/kern_sysctl.c
==============================================================================
--- head/sys/kern/kern_sysctl.c	Wed Apr 15 16:33:55 2020	(r359975)
+++ head/sys/kern/kern_sysctl.c	Wed Apr 15 16:55:38 2020	(r359976)
@@ -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;


More information about the svn-src-head mailing list