From 95fac9cdb267b6a0f2aba6684ae6f58404caf763 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sun, 24 Apr 2005 11:15:37 +0000 Subject: code cleanup --- lib/libalpm/trans.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h index c097d897..403cf116 100644 --- a/lib/libalpm/trans.h +++ b/lib/libalpm/trans.h @@ -34,13 +34,24 @@ typedef struct __pmtrans_t { unsigned char type; unsigned char flags; unsigned char state; - PMList *targets; /* PMList of (char *) */ - PMList *packages; /* PMList of (pmpkginfo_t *) */ + PMList *targets; /* PMList of (char *) */ + PMList *packages; /* PMList of (pmpkg_t *) or (pmsyncpkg_t *) */ alpm_trans_cb cb; } pmtrans_t; -#define FREETRANS(p) do { if (p) { trans_free(p); p = NULL; } } while (0) -#define TRANS_CB(t, e, d1, d2) do { if((t) && (t)->cb) { (t)->cb(e, d1, d2); } } while(0) +#define FREETRANS(p) \ +do { \ + if(p) { \ + trans_free(p); \ + p = NULL; \ + } \ +} while (0) +#define TRANS_CB(t, e, d1, d2) \ +do { \ + if((t) && (t)->cb) { \ + (t)->cb(e, d1, d2); \ + } \ +} while(0) pmtrans_t *trans_new(); void trans_free(pmtrans_t *trans); -- cgit v1.2.3-2-g168b