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. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18403
This commit is contained in:
parent
e2ed7941e0
commit
fbf14fe84b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341411
@ -73,8 +73,10 @@ dispatch_set(int argc, char *argv[], struct nvme_function **tbl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (f < tbl_limit) {
|
while (f < tbl_limit) {
|
||||||
if (strcmp(argv[1], (*f)->name) == 0)
|
if (strcmp(argv[1], (*f)->name) == 0) {
|
||||||
(*f)->fn(argc-1, &argv[1]);
|
(*f)->fn(argc-1, &argv[1]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
f++;
|
f++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user