avoid -Wsign-compare warning in argv copying

This commit is contained in:
Damien Miller 2017-10-23 16:25:24 +11:00
parent b7548b12a6
commit e3fa20e2e5
1 changed files with 1 additions and 1 deletions

2
sshd.c
View File

@ -1383,7 +1383,7 @@ main(int ac, char **av)
saved_argc = ac;
rexec_argc = ac;
saved_argv = xcalloc(ac + 1, sizeof(*saved_argv));
for (i = 0; i < ac; i++)
for (i = 0; (int)i < ac; i++)
saved_argv[i] = xstrdup(av[i]);
saved_argv[i] = NULL;