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

@@ -258,7 +258,7 @@ xbps_transaction_sort(struct xbps_handle *xhp)
xbps_array_t provides, sorted, unsorted, rundeps;
xbps_object_t obj;
struct pkgdep *pd;
unsigned int i, j, ndeps = 0, cnt = 0;
unsigned int ndeps = 0, cnt = 0;
const char *pkgname, *pkgver, *tract, *vpkgdep;
int rv = 0;
bool vpkg_found;
@@ -290,7 +290,7 @@ xbps_transaction_sort(struct xbps_handle *xhp)
* Iterate over the unsorted package dictionaries and sort all
* its package dependencies.
*/
for (i = 0; i < ndeps; i++) {
for (unsigned int i = 0; i < ndeps; i++) {
vpkg_found = false;
obj = xbps_array_get(unsorted, i);
xbps_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);
@@ -305,7 +305,7 @@ xbps_transaction_sort(struct xbps_handle *xhp)
* if any of them was previously added. If true, don't
* add it into the list again, just order its deps.
*/
for (j = 0; j < xbps_array_count(provides); j++) {
for (unsigned int j = 0; j < xbps_array_count(provides); j++) {
xbps_array_get_cstring_nocopy(provides,
j, &vpkgdep);
pd = pkgdep_find(vpkgdep);