From c00657d4f51a63de77146a28d1f60ce23fbf3e51 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 25 Mar 2008 04:45:54 +0200 Subject: [PATCH] libdpkg: Remove unused argument from unlockdatabase --- ChangeLog | 6 ++++++ lib/dbmodify.c | 2 +- lib/dpkg-db.h | 2 +- lib/lock.c | 4 +++- src/update.c | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18da5cf6..a5b707d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-25 Guillem Jover + + * 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 , Guillem Jover diff --git a/lib/dbmodify.c b/lib/dbmodify.c index ba85037f..d8556528 100644 --- a/lib/dbmodify.c +++ b/lib/dbmodify.c @@ -222,7 +222,7 @@ void modstatdb_shutdown(void) { varbuffree(&uvb); /* fall through */ case msdbrw_needsuperuserlockonly: - unlockdatabase(admindir); + unlockdatabase(); default: break; } diff --git a/lib/dpkg-db.h b/lib/dpkg-db.h index f56ab694..edb67fa6 100644 --- a/lib/dpkg-db.h +++ b/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 ***/ diff --git a/lib/lock.c b/lib/lock.c index 5d8e3c0c..3cf83642 100644 --- a/lib/lock.c +++ b/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(); } diff --git a/src/update.c b/src/update.c index 1b14cb3c..b1b59a23 100644 --- a/src/update.c +++ b/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) -- 2.39.5