diff options
Diffstat (limited to 'usr.sbin/pkg_install/create/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index d2cfd03..2aa7e85 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -126,11 +126,14 @@ pkg_perform(char **pkgs) errx(2, "%s: alloca() failed", __FUNCTION__); /* Not reached */ } - for (i = 0; Pkgdeps; i++) { + for (i = 0; Pkgdeps;) { cp = strsep(&Pkgdeps, " \t\n"); - if (*cp) + if (*cp) { deps[i] = cp; + i++; + } } + ndeps = i; deps[ndeps] = NULL; sortdeps(deps); |