Skip to content

Commit 751a110

Browse files
nabijaczleweliaafeijoo-suse
authored andcommitted
perf(dracut-install): multiple single-character strstr()s -> strpbrk()
1 parent 1e5237d commit 751a110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/install/dracut-install.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ static int install_firmware(struct kmod_module *mod)
14201420

14211421
_asprintf(&fwpath, "%s/%s", *q, value);
14221422

1423-
if ((strstr(value, "*") != 0 || strstr(value, "?") != 0 || strstr(value, "[") != 0)
1423+
if (strpbrk(value, "*?[") != NULL
14241424
&& stat(fwpath, &sb) != 0) {
14251425
size_t i;
14261426
_cleanup_globfree_ glob_t globbuf;

0 commit comments

Comments
 (0)