Kaynağa Gözat

libdpkg: Do not use status setters on package constructors

The setting should be unconditional, as we might be dealing with
uninitialized memory.

Accidental addition in commit 7db64047f18ae151d697c9e1d4b5fcf4abc6ae2b.
Guillem Jover 14 yıl önce
ebeveyn
işleme
d397aea45e
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      lib/dpkg/pkg.c

+ 3 - 3
lib/dpkg/pkg.c

@@ -104,9 +104,9 @@ pkg_blank(struct pkginfo *pkg)
 {
 	pkg->set = NULL;
 	pkg->arch_next = NULL;
-	pkg_set_status(pkg, stat_notinstalled);
-	pkg_reset_eflags(pkg);
-	pkg_set_want(pkg, want_unknown);
+	pkg->status = stat_notinstalled;
+	pkg->eflag = eflag_ok;
+	pkg->want = want_unknown;
 	pkg->priority = pri_unknown;
 	pkg->otherpriority = NULL;
 	pkg->section = NULL;