Skip to content

Commit 55468a2

Browse files
sshedijohannbg
authored andcommitted
fix(install): use size_t to avoid -Wsign-compare warning
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
1 parent ef0f848 commit 55468a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/install/dracut-install.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ static int install_all(int argc, char **argv)
13141314

13151315
ret = glob(realsrc, 0, NULL, &globbuf);
13161316
if (ret == 0) {
1317-
int j;
1317+
size_t j;
13181318

13191319
for (j = 0; j < globbuf.gl_pathc; j++) {
13201320
char *dest = strdup(globbuf.gl_pathv[j] + sysrootdirlen);
@@ -1388,8 +1388,9 @@ static int install_firmware(struct kmod_module *mod)
13881388

13891389
if ((strstr(value, "*") != 0 || strstr(value, "?") != 0 || strstr(value, "[") != 0)
13901390
&& stat(fwpath, &sb) != 0) {
1391-
int i;
1391+
size_t i;
13921392
_cleanup_globfree_ glob_t globbuf;
1393+
13931394
glob(fwpath, 0, NULL, &globbuf);
13941395
for (i = 0; i < globbuf.gl_pathc; i++) {
13951396
ret = install_firmware_fullpath(globbuf.gl_pathv[i]);

0 commit comments

Comments
 (0)