Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2018 11:13:11 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r340948 - stable/12/sys/kern
Message-ID:  <201811261113.wAQBDBiE021023@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Nov 26 11:13:11 2018
New Revision: 340948
URL: https://svnweb.freebsd.org/changeset/base/340948

Log:
  MFC r340622:
  Minor code factoring. No functional change.
  
  Sponsored by:		Mellanox Technologies

Modified:
  stable/12/sys/kern/kern_sysctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_sysctl.c
==============================================================================
--- stable/12/sys/kern/kern_sysctl.c	Mon Nov 26 11:11:53 2018	(r340947)
+++ stable/12/sys/kern/kern_sysctl.c	Mon Nov 26 11:13:11 2018	(r340948)
@@ -546,10 +546,10 @@ sysctl_unregister_oid(struct sysctl_oid *oidp)
 	int error;
 
 	SYSCTL_ASSERT_WLOCKED();
-	error = ENOENT;
 	if (oidp->oid_number == OID_AUTO) {
 		error = EINVAL;
 	} else {
+		error = ENOENT;
 		SLIST_FOREACH(p, oidp->oid_parent, oid_link) {
 			if (p == oidp) {
 				SLIST_REMOVE(oidp->oid_parent, oidp,



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