summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-07 09:42:48 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-07 09:42:48 +0000
commitf3a4197e349ec7441f2b4dfe6e3010bbfe400164 (patch)
tree88352537a1dae2a182ea5cc792c25b4fd4cdb45e /lib
parent6c3657b7022c7873fca38b30796e7659b7580b34 (diff)
downloadpacman-f3a4197e349ec7441f2b4dfe6e3010bbfe400164.tar.xz
code cleanup (mainly removed line spaces at the beginning of lines by tabulations)
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/alpm.h4
-rw-r--r--lib/libalpm/sync.c28
-rw-r--r--lib/libalpm/util.c6
-rw-r--r--lib/libftp/ftplib.c4
4 files changed, 22 insertions, 20 deletions
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);
diff --git a/lib/libftp/ftplib.c b/lib/libftp/ftplib.c
index 8be3cac1..262cac0b 100644
--- a/lib/libftp/ftplib.c
+++ b/lib/libftp/ftplib.c
@@ -1513,8 +1513,8 @@ static int HttpXfer(const char *localfile, const char *path, int *size,
* return 1 if successful, 0 otherwise
*/
GLOBALREF int HttpGet(const char *host, const char *outputfile, const char *path,
- int *size, netbuf *nControl, unsigned int offset,
- const struct tm *mtime1, struct tm *mtime2)
+ int *size, netbuf *nControl, unsigned int offset,
+ const struct tm *mtime1, struct tm *mtime2)
{
char buf[512];