Просмотр исходного кода

libdpkg: Remove unused argument from unlockdatabase

Guillem Jover лет назад: 18
Родитель
Сommit
c00657d4f5
5 измененных файлов с 12 добавлено и 4 удалено
  1. 6 0
      ChangeLog
  2. 1 1
      lib/dbmodify.c
  3. 1 1
      lib/dpkg-db.h
  4. 3 1
      lib/lock.c
  5. 1 1
      src/update.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-03-25  Guillem Jover  <guillem@debian.org>
+
+	* lib/dpkg-db.h (unlockdatabase): Change prototype to not take any
+	argument (as it was not being used). Fix all callers.
+	* lib/lock.c (unlockdatabase): Likewise.
+
 2008-03-25  Ian Jackson  <ian@davenant.greenend.org.uk>,
             Guillem Jover  <guillem@debian.org>
 

+ 1 - 1
lib/dbmodify.c

@@ -222,7 +222,7 @@ void modstatdb_shutdown(void) {
     varbuffree(&uvb);
     /* fall through */
   case msdbrw_needsuperuserlockonly:
-    unlockdatabase(admindir);
+    unlockdatabase();
   default:
     break;
   }

+ 1 - 1
lib/dpkg-db.h

@@ -151,7 +151,7 @@ struct pkginfo { /* pig */
 /*** from lock.c ***/
 
 void lockdatabase(const char *admindir);
-void unlockdatabase(const char *admindir);
+void unlockdatabase(void);
 
 /*** from dbmodify.c ***/
 

+ 3 - 1
lib/lock.c

@@ -77,7 +77,9 @@ lock_file(int *lockfd, const char *filename,
   push_cleanup(cu_unlock_file, ~0, NULL, 0, 1, lockfd);
 }
 
-void unlockdatabase(const char *admindir) {
+void
+unlockdatabase(void)
+{
   unlock_file();
 }
 

+ 1 - 1
src/update.c

@@ -87,7 +87,7 @@ void updateavailable(const char *const *argv) {
 
   if (!f_noact) {
     writedb(vb.buf,1,0);
-    unlockdatabase(admindir);
+    unlockdatabase();
   }
 
   if (cipaction->arg != act_avclear)