Explorar el Código

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 hace 14 años
padre
commit
d397aea45e
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  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;