From: наб Date: Tue, 26 Apr 2022 15:13:55 +0000 (+0200) Subject: perf(dracut-install): multiple single-character strstr()s -> strpbrk() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=751a110f29f07cb41246c09784c63bb26bb708c6;p=thirdparty%2Fdracut.git perf(dracut-install): multiple single-character strstr()s -> strpbrk() --- diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c index 96b20e916..5423912da 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c @@ -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;