]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(install): use size_t to avoid -Wsign-compare warning
authorShreenidhi Shedi <sshedi@vmware.com>
Mon, 9 Aug 2021 04:58:06 +0000 (10:28 +0530)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 9 Aug 2021 17:11:22 +0000 (17:11 +0000)
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
src/install/dracut-install.c

index 1e624978ae4b17cc566f08db0d734e1f190405b2..f1e76bef15dacc74d4b1e0d589c0302cc9369463 100644 (file)
@@ -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]);