Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2019 16:47:38 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352256 - head/sys/kern
Message-ID:  <201909121647.x8CGlcPT041260@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Sep 12 16:47:38 2019
New Revision: 352256
URL: https://svnweb.freebsd.org/changeset/base/352256

Log:
  Remove a redundant NULL pointer check in cpuset_modify_domain().
  
  cpuset_getroot() is guaranteed to return a non-NULL pointer.
  
  Reported by:	Mark Millard <marklmi@yahoo.com>
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/kern/kern_cpuset.c

Modified: head/sys/kern/kern_cpuset.c
==============================================================================
--- head/sys/kern/kern_cpuset.c	Thu Sep 12 16:45:07 2019	(r352255)
+++ head/sys/kern/kern_cpuset.c	Thu Sep 12 16:47:38 2019	(r352256)
@@ -796,7 +796,7 @@ cpuset_modify_domain(struct cpuset *set, struct domain
 		/*
 		 * Verify that we have access to this set of domains.
 		 */
-		if (root && !domainset_valid(dset, domain)) {
+		if (!domainset_valid(dset, domain)) {
 			error = EINVAL;
 			goto out;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909121647.x8CGlcPT041260>