summaryrefslogtreecommitdiff
path: root/lib/libalpm/backup.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-17 08:55:05 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-17 08:55:05 +0000
commit92ad5565128d4e6546437b2f28e90cced7c11e03 (patch)
treed49354ac84ce414df3108bae105a57800178b96d /lib/libalpm/backup.c
parent1dff742de81f37eccda914167f05415bfe2abff0 (diff)
downloadpacman-92ad5565128d4e6546437b2f28e90cced7c11e03.tar.xz
* A whole mess of backup changes
- the code should be clearer, more organized, commented, and have worthwhile variable names now - proactive backup=()s now work. That is, adding a file to a backup array does what it should on the upgrade to that package, no longer forcing you to wait a full upgrade cycle for it to take effect * ldconfig was being run twice on an upgrade operation - fixed * fixed another pm_fprintf/printf output corruption with the progress bars * refactored some duplicate code for adjusting 'requiredby' lists * Added config.rpath to .cvsignore
Diffstat (limited to 'lib/libalpm/backup.c')
-rw-r--r--lib/libalpm/backup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index 3750f7db..751d0937 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -33,7 +33,7 @@
/* Look for a filename in a pmpkg_t.backup list. If we find it,
* then we return the md5 or sha1 hash (parsed from the same line)
*/
-char *_alpm_needbackup(char *file, alpm_list_t *backup)
+char *_alpm_needbackup(const char *file, alpm_list_t *backup)
{
alpm_list_t *lp;
@@ -57,7 +57,7 @@ char *_alpm_needbackup(char *file, alpm_list_t *backup)
*ptr = '\0';
ptr++;
/* now str points to the filename and ptr points to the md5 or sha1 hash */
- if(!strcmp(file, str)) {
+ if(strcmp(file, str) == 0) {
char *hash = strdup(ptr);
FREE(str);
return(hash);