Skip to content

Commit

Permalink
perf(dracut-install): multiple single-character strstr()s -> strpbrk()
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli authored and aafeijoo-suse committed Dec 28, 2022
1 parent 1e5237d commit 751a110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/install/dracut-install.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ static int install_firmware(struct kmod_module *mod)

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

if ((strstr(value, "*") != 0 || strstr(value, "?") != 0 || strstr(value, "[") != 0)
if (strpbrk(value, "*?[") != NULL
&& stat(fwpath, &sb) != 0) {
size_t i;
_cleanup_globfree_ glob_t globbuf;
Expand Down

0 comments on commit 751a110

Please sign in to comment.