Commit cc1a0187 authored by Natanael Copa's avatar Natanael Copa
Browse files

state: style fix, init variable at declaration

parent 0c1933a4
...@@ -162,7 +162,7 @@ int apk_state_lock_dependency(struct apk_state *state, ...@@ -162,7 +162,7 @@ int apk_state_lock_dependency(struct apk_state *state,
{ {
struct apk_name *name = dep->name; struct apk_name *name = dep->name;
struct apk_name_choices *c; struct apk_name_choices *c;
struct apk_package *installed, *latest, *use; struct apk_package *installed, *latest = NULL, *use;
int i; int i;
if (ns_empty(state->name[name->id])) { if (ns_empty(state->name[name->id])) {
...@@ -220,7 +220,7 @@ int apk_state_lock_dependency(struct apk_state *state, ...@@ -220,7 +220,7 @@ int apk_state_lock_dependency(struct apk_state *state,
#if 1 #if 1
/* Get latest and installed packages */ /* 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]; struct apk_package *pkg = c->pkgs[i];
if (apk_pkg_get_state(c->pkgs[i]) == APK_PKG_INSTALLED) if (apk_pkg_get_state(c->pkgs[i]) == APK_PKG_INSTALLED)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment