Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2019 17:39:50 +0000 (UTC)
From:      Alexander Motin <mav@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: r350908 - stable/12/sbin/nvmecontrol
Message-ID:  <201908121739.x7CHdocC016309@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Aug 12 17:39:50 2019
New Revision: 350908
URL: https://svnweb.freebsd.org/changeset/base/350908

Log:
  MFC r341411 (by imp): Return after we find the dispatched function.
  
  If the dispatched function doesn't exit, then we get can get a
  spurious function not found message. They all do exit, but this is a
  little cleaner.

Modified:
  stable/12/sbin/nvmecontrol/nvmecontrol.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/nvmecontrol/nvmecontrol.c
==============================================================================
--- stable/12/sbin/nvmecontrol/nvmecontrol.c	Mon Aug 12 17:39:16 2019	(r350907)
+++ stable/12/sbin/nvmecontrol/nvmecontrol.c	Mon Aug 12 17:39:50 2019	(r350908)
@@ -73,8 +73,10 @@ dispatch_set(int argc, char *argv[], struct nvme_funct
 	}
 
 	while (f < tbl_limit) {
-		if (strcmp(argv[1], (*f)->name) == 0)
+		if (strcmp(argv[1], (*f)->name) == 0) {
 			(*f)->fn(argc-1, &argv[1]);
+			return;
+		}
 		f++;
 	}
 



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