浏览代码

libdpkg: Do not recompute importanttmpfile on unlink

Guillem Jover 18 年之前
父节点
当前提交
dd80349748
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 5 0
      ChangeLog
  2. 1 1
      lib/dbmodify.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-10-15  Guillem Jover  <guillem@debian.org>
+
+	* lib/dbmodify.c (modstatdb_shutdown): Use importanttmpfile on unlink
+	instead of constructing the file name again.
+
 2008-10-15  Guillem Jover  <guillem@debian.org>
 
 	* src/Makefile.am (dpkg_query_SOURCES): Remove 'errors.c'.

+ 1 - 1
lib/dbmodify.c

@@ -226,7 +226,7 @@ void modstatdb_shutdown(void) {
     writedb(availablefile,1,0);
     /* tidy up a bit, but don't worry too much about failure */
     fclose(importanttmp);
-    strcpy(updatefnrest, IMPORTANTTMP); unlink(updatefnbuf);
+    unlink(importanttmpfile);
     varbuffree(&uvb);
     /* fall through */
   case msdbrw_needsuperuserlockonly: