aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShreenidhi Shedi <sshedi@vmware.com>2021-08-09 10:28:06 +0530
committerJóhann B. Guðmundsson <johannbg@gmail.com>2021-08-09 17:11:22 +0000
commit55468a2d40182de4cce5ba4ecd5dcd96be03bd4d (patch)
tree53a3185b8183868b59374d470d9aebad8cb3f880
parentef0f848a67fdd0a0dab135acbd1cd7fa0179a95c (diff)
downloaddracut-55468a2d40182de4cce5ba4ecd5dcd96be03bd4d.tar.gz
fix(install): use size_t to avoid -Wsign-compare warning
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
-rw-r--r--src/install/dracut-install.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
index 1e624978..f1e76bef 100644
--- a/src/install/dracut-install.c
+++ b/src/install/dracut-install.c
@@ -1314,7 +1314,7 @@ static int install_all(int argc, char **argv)
ret = glob(realsrc, 0, NULL, &globbuf);
if (ret == 0) {
- int j;
+ size_t j;
for (j = 0; j < globbuf.gl_pathc; j++) {
char *dest = strdup(globbuf.gl_pathv[j] + sysrootdirlen);
@@ -1388,8 +1388,9 @@ static int install_firmware(struct kmod_module *mod)
if ((strstr(value, "*") != 0 || strstr(value, "?") != 0 || strstr(value, "[") != 0)
&& stat(fwpath, &sb) != 0) {
- int i;
+ size_t i;
_cleanup_globfree_ glob_t globbuf;
+
glob(fwpath, 0, NULL, &globbuf);
for (i = 0; i < globbuf.gl_pathc; i++) {
ret = install_firmware_fullpath(globbuf.gl_pathv[i]);