Use C99 for loop initializers.

That means that a C99 compiler is now mandatory.
This commit is contained in:
Juan RP
2013-09-15 10:06:49 +02:00
parent 9a9c816552
commit 4057e4961c
32 changed files with 105 additions and 138 deletions

View File

@ -52,7 +52,6 @@ xbps_rpool_init(struct xbps_handle *xhp)
{
struct rpool *rp;
const char *repouri;
unsigned int i;
bool foundrepo = false;
int rv = 0;
@ -63,7 +62,7 @@ xbps_rpool_init(struct xbps_handle *xhp)
else if (xhp->cfg == NULL)
return ENOTSUP;
for (i = 0; i < cfg_size(xhp->cfg, "repositories"); i++) {
for (unsigned int i = 0; i < cfg_size(xhp->cfg, "repositories"); i++) {
rp = malloc(sizeof(struct rpool));
assert(rp);
repouri = cfg_getnstr(xhp->cfg, "repositories", i);
@ -114,12 +113,11 @@ int
xbps_rpool_sync(struct xbps_handle *xhp, const char *uri)
{
const char *repouri;
unsigned int i;
if (xhp->cfg == NULL)
return ENOTSUP;
for (i = 0; i < cfg_size(xhp->cfg, "repositories"); i++) {
for (unsigned int i = 0; i < cfg_size(xhp->cfg, "repositories"); i++) {
repouri = cfg_getnstr(xhp->cfg, "repositories", i);
/* If argument was set just process that repository */
if (uri && strcmp(repouri, uri))