summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-12-21 02:53:40 +0100
committerAaron Griffin <aaron@archlinux.org>2006-12-21 02:53:40 +0100
commit74e347f09bd62872de84b431dcf029090931d199 (patch)
tree966f7b6b2a35ccaecb61b2119f28a2bad2340a96 /lib/libalpm
parentb1fbcd3ab5cf16b668cfc72d90223f48a329605b (diff)
downloadpacman-74e347f09bd62872de84b431dcf029090931d199.tar.gz
pacman-74e347f09bd62872de84b431dcf029090931d199.tar.xz
* modeline fixes / reformatting
* formatting / indentation fixes * makepkg: Dan McGee <dpmcgee@gmail.com> - integrity check fix Jürgen Hötzel <juergen@hoetzel.info> - EUID usage and "x$foo" check revamp
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c56
-rw-r--r--lib/libalpm/db.c2
-rw-r--r--lib/libalpm/sha1.c2
-rw-r--r--lib/libalpm/sha1.h2
4 files changed, 33 insertions, 29 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 51029d6d..92aceff6 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -562,40 +562,40 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
if(!file) continue;
if(!strcmp(file, pathname)) {
- if(info->sha1sum != NULL && info->sha1sum != '\0') {
- /* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
- if((fn = (char *)malloc(strlen(file)+34)) == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
- sprintf(fn, "%s\t%s", file, md5_pkg);
- FREE(file);
- lp->data = fn;
- } else {
- /* 41 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
- if((fn = (char *)malloc(strlen(file)+43)) == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
+ if(info->sha1sum != NULL && info->sha1sum != '\0') {
+ /* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
+ if((fn = (char *)malloc(strlen(file)+34)) == NULL) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
+ sprintf(fn, "%s\t%s", file, md5_pkg);
+ FREE(file);
+ lp->data = fn;
+ } else {
+ /* 41 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
+ if((fn = (char *)malloc(strlen(file)+43)) == NULL) {
+ RET_ERR(PM_ERR_MEMORY, -1);
+ }
+ sprintf(fn, "%s\t%s", file, sha1_pkg);
+ FREE(file);
+ lp->data = fn;
}
- sprintf(fn, "%s\t%s", file, sha1_pkg);
- FREE(file);
- lp->data = fn;
- }
}
}
if (info->sha1sum != NULL && info->sha1sum != '\0') {
- _alpm_log(PM_LOG_DEBUG, _("checking md5 hashes for %s"), pathname);
- _alpm_log(PM_LOG_DEBUG, _("current: %s"), md5_local);
- _alpm_log(PM_LOG_DEBUG, _("new: %s"), md5_pkg);
- if(md5_orig) {
- _alpm_log(PM_LOG_DEBUG, _("original: %s"), md5_orig);
- }
+ _alpm_log(PM_LOG_DEBUG, _("checking md5 hashes for %s"), pathname);
+ _alpm_log(PM_LOG_DEBUG, _("current: %s"), md5_local);
+ _alpm_log(PM_LOG_DEBUG, _("new: %s"), md5_pkg);
+ if(md5_orig) {
+ _alpm_log(PM_LOG_DEBUG, _("original: %s"), md5_orig);
+ }
} else {
- _alpm_log(PM_LOG_DEBUG, _("checking sha1 hashes for %s"), pathname);
- _alpm_log(PM_LOG_DEBUG, _("current: %s"), sha1_local);
- _alpm_log(PM_LOG_DEBUG, _("new: %s"), sha1_pkg);
- if(sha1_orig) {
- _alpm_log(PM_LOG_DEBUG, _("original: %s"), sha1_orig);
- }
+ _alpm_log(PM_LOG_DEBUG, _("checking sha1 hashes for %s"), pathname);
+ _alpm_log(PM_LOG_DEBUG, _("current: %s"), sha1_local);
+ _alpm_log(PM_LOG_DEBUG, _("new: %s"), sha1_pkg);
+ if(sha1_orig) {
+ _alpm_log(PM_LOG_DEBUG, _("original: %s"), sha1_orig);
+ }
}
if(!pmo_upgrade) {
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 6cb6fe8f..e6b3f4df 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -248,4 +248,4 @@ const char *alpm_db_get_url(pmdb_t *db)
return strdup(path);
}
-/* vim: set noet: */
+/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/sha1.c b/lib/libalpm/sha1.c
index 4fd110ea..c1b03e84 100644
--- a/lib/libalpm/sha1.c
+++ b/lib/libalpm/sha1.c
@@ -413,3 +413,5 @@ char* _alpm_SHAFile(char *filename) {
return(NULL);
}
+
+/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libalpm/sha1.h b/lib/libalpm/sha1.h
index 22530eb9..f00b4122 100644
--- a/lib/libalpm/sha1.h
+++ b/lib/libalpm/sha1.h
@@ -58,3 +58,5 @@ struct sha_ctx
/* Needed for pacman */
char *_alpm_SHAFile (char *);
+
+/* vim: set ts=2 sw=2 noet: */