Skip to content

Commit

Permalink
fix(install): use size_t to avoid -Wsign-compare warning
Browse files Browse the repository at this point in the history
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
  • Loading branch information
sshedi authored and johannbg committed Aug 9, 2021
1 parent ef0f848 commit 55468a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/install/dracut-install.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 55468a2

Please sign in to comment.