pkg: cleanups

pull/15/head
William Pitcock 2012-05-06 22:38:44 -05:00
parent 0d4287afa7
commit a961a523f7
1 changed files with 2 additions and 7 deletions

9
pkg.c
View File

@ -151,7 +151,7 @@ pkg_find(const char *name, unsigned int flags)
{
count = path_split(env_path, &path);
while (iter < count)
for (iter = 0; iter < count; iter++)
{
snprintf(locbuf, sizeof locbuf, "%s/%s" PKG_CONFIG_EXT, path[iter], name);
snprintf(uninst_locbuf, sizeof uninst_locbuf, "%s/%s-uninstalled" PKG_CONFIG_EXT, path[iter], name);
@ -169,8 +169,6 @@ pkg_find(const char *name, unsigned int flags)
pkg = pkg_new_from_file(locbuf, f);
goto out;
}
iter++;
}
}
@ -182,8 +180,7 @@ pkg_find(const char *name, unsigned int flags)
{
count = path_split(env_path, &path);
iter = 0;
while (iter < count)
for (iter = 0; iter < count; iter++)
{
snprintf(locbuf, sizeof locbuf, "%s/%s" PKG_CONFIG_EXT, path[iter], name);
snprintf(uninst_locbuf, sizeof uninst_locbuf, "%s/%s-uninstalled" PKG_CONFIG_EXT, path[iter], name);
@ -201,8 +198,6 @@ pkg_find(const char *name, unsigned int flags)
pkg = pkg_new_from_file(locbuf, f);
goto out;
}
iter++;
}
}