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

@@ -78,7 +78,6 @@ xbps_find_pkg_obsoletes(struct xbps_handle *xhp,
xbps_array_t instfiles, newfiles, obsoletes;
xbps_object_t obj, obj2;
xbps_string_t oldstr, newstr;
unsigned int i, x;
const char *oldhash;
char *file;
int rv = 0;
@@ -101,7 +100,7 @@ xbps_find_pkg_obsoletes(struct xbps_handle *xhp,
/*
* Iterate over files list from installed package.
*/
for (i = 0; i < xbps_array_count(instfiles); i++) {
for (unsigned int i = 0; i < xbps_array_count(instfiles); i++) {
found = false;
obj = xbps_array_get(instfiles, i);
if (xbps_object_type(obj) != XBPS_TYPE_DICTIONARY) {
@@ -132,7 +131,7 @@ xbps_find_pkg_obsoletes(struct xbps_handle *xhp,
/*
* Check if current file is available in new pkg filelist.
*/
for (x = 0; x < xbps_array_count(newfiles); x++) {
for (unsigned int x = 0; x < xbps_array_count(newfiles); x++) {
obj2 = xbps_array_get(newfiles, x);
newstr = xbps_dictionary_get(obj2, "file");
assert(newstr);