summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-04-15 09:29:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-04-15 09:29:00 +0000
commit0c1933a4d6b1db2fe47ab4856a8457a0a3cf8131 (patch)
treecc9595b5eb40c82f47cf58125c26e1652604aa8e /src
parent9567337fd2444aa9b30a6cbfdd5bc9a98d171f25 (diff)
downloadapk-tools-0c1933a4d6b1db2fe47ab4856a8457a0a3cf8131.tar.gz
apk-tools-0c1933a4d6b1db2fe47ab4856a8457a0a3cf8131.tar.bz2
apk-tools-0c1933a4d6b1db2fe47ab4856a8457a0a3cf8131.tar.xz
apk-tools-0c1933a4d6b1db2fe47ab4856a8457a0a3cf8131.zip
state: fix bug with uninitialized variable 'latest'
Diffstat (limited to 'src')
-rw-r--r--src/state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index 79655a9..8af528a 100644
--- a/src/state.c
+++ b/src/state.c
@@ -220,7 +220,7 @@ int apk_state_lock_dependency(struct apk_state *state,
#if 1
/* Get latest and installed packages */
- for (i = 0; i < c->num; i++) {
+ for (i = 0, latest = NULL; i < c->num; i++) {
struct apk_package *pkg = c->pkgs[i];
if (apk_pkg_get_state(c->pkgs[i]) == APK_PKG_INSTALLED)