diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-15 09:38:15 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-15 09:38:15 +0000 |
commit | cc1a0187eeaff681fea7eb04d0db289774bc7cb1 (patch) | |
tree | d782a0806e6b0fd73546d3a819363999c56d6569 | |
parent | 0c1933a4d6b1db2fe47ab4856a8457a0a3cf8131 (diff) | |
download | apk-tools-cc1a0187eeaff681fea7eb04d0db289774bc7cb1.tar.gz apk-tools-cc1a0187eeaff681fea7eb04d0db289774bc7cb1.tar.bz2 apk-tools-cc1a0187eeaff681fea7eb04d0db289774bc7cb1.tar.xz apk-tools-cc1a0187eeaff681fea7eb04d0db289774bc7cb1.zip |
state: style fix, init variable at declaration
-rw-r--r-- | src/state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index 8af528a..d131e1b 100644 --- a/src/state.c +++ b/src/state.c @@ -162,7 +162,7 @@ int apk_state_lock_dependency(struct apk_state *state, { struct apk_name *name = dep->name; struct apk_name_choices *c; - struct apk_package *installed, *latest, *use; + struct apk_package *installed, *latest = NULL, *use; int i; if (ns_empty(state->name[name->id])) { @@ -220,7 +220,7 @@ int apk_state_lock_dependency(struct apk_state *state, #if 1 /* Get latest and installed packages */ - for (i = 0, latest = NULL; i < c->num; i++) { + for (i = 0; i < c->num; i++) { struct apk_package *pkg = c->pkgs[i]; if (apk_pkg_get_state(c->pkgs[i]) == APK_PKG_INSTALLED) |