From 751a110f29f07cb41246c09784c63bb26bb708c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=BD=D0=B0=D0=B1?= Date: Tue, 26 Apr 2022 17:13:55 +0200 Subject: [PATCH] perf(dracut-install): multiple single-character strstr()s -> strpbrk() --- src/install/dracut-install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2