From f3a4197e349ec7441f2b4dfe6e3010bbfe400164 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sat, 7 Jan 2006 09:42:48 +0000 Subject: code cleanup (mainly removed line spaces at the beginning of lines by tabulations) --- lib/libalpm/alpm.h | 4 ++-- lib/libalpm/sync.c | 28 ++++++++++++++-------------- lib/libalpm/util.c | 6 ++++-- 3 files changed, 20 insertions(+), 18 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 09034067..59ea151c 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -155,7 +155,7 @@ enum { }; /* reasons -- ie, why the package was installed */ -#define PM_PKG_REASON_EXPLICIT 0 /* explicitly requested by the user */ +#define PM_PKG_REASON_EXPLICIT 0 /* explicitly requested by the user */ #define PM_PKG_REASON_DEPEND 1 /* installed as a dependency for another package */ void *alpm_pkg_getinfo(PM_PKG *pkg, unsigned char parm); @@ -367,7 +367,7 @@ extern enum __pmerrno_t { char *alpm_strerror(int err); -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 63e7bc48..00e3d5a8 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -514,25 +514,25 @@ int sync_prepare(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, PMList ** /* abort */ _alpm_log(PM_LOG_ERROR, "package conflicts detected"); errorout = 1; - if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) { - FREELIST(*data); - pm_errno = PM_ERR_MEMORY; - goto error; - } - *miss = *(pmdepmissing_t *)i->data; - *data = pm_list_add(*data, miss); + if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) { + FREELIST(*data); + pm_errno = PM_ERR_MEMORY; + goto error; + } + *miss = *(pmdepmissing_t *)i->data; + *data = pm_list_add(*data, miss); } } } else { _alpm_log(PM_LOG_ERROR, "%s conflicts with %s", miss->target, miss->depend.name); errorout = 1; - if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) { - FREELIST(*data); - pm_errno = PM_ERR_MEMORY; - goto error; - } - *miss = *(pmdepmissing_t *)i->data; - *data = pm_list_add(*data, miss); + if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) { + FREELIST(*data); + pm_errno = PM_ERR_MEMORY; + goto error; + } + *miss = *(pmdepmissing_t *)i->data; + *data = pm_list_add(*data, miss); } } } diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 8c0b38a7..79287d34 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -328,8 +328,10 @@ int _alpm_log_action(unsigned char usesyslog, FILE *f, char *fmt, ...) t = time(NULL); tm = localtime(&t); - fprintf(f, "[%02d/%02d/%02d %02d:%02d] %s\n", tm->tm_mon+1, tm->tm_mday, - tm->tm_year-100, tm->tm_hour, tm->tm_min, msg); + fprintf(f, "[%02d/%02d/%02d %02d:%02d] %s\n", + tm->tm_mon+1, tm->tm_mday, tm->tm_year-100, + tm->tm_hour, tm->tm_min, + msg); } return(0); -- cgit v1.2.3-24-g4f1b