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++;
        }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to