Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.h
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-11-07 12:59:29 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-11-07 12:59:29 +0000
commit2e559ba431aa2cf78e3296a85ff090bd7b6b0fe6 (patch)
tree38d3b54f59b2f786a929e7c69b4096af666c60d2 /lib/libalpm/sync.h
parentb2df466ffd87c46a823fc46c3ca0026f6c9a001e (diff)
added a FREESYNC macro to release pointers to pmsyncpkg_t structures
Diffstat (limited to 'lib/libalpm/sync.h')
-rw-r--r--lib/libalpm/sync.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/sync.h b/lib/libalpm/sync.h
index 615e17d2..59c42064 100644
--- a/lib/libalpm/sync.h
+++ b/lib/libalpm/sync.h
@@ -31,6 +31,8 @@ typedef struct __pmsyncpkg_t {
void *data;
} pmsyncpkg_t;
+#define FREESYNC(p) do { if(p) { sync_free(p); p = NULL; } } while(0)
+
pmsyncpkg_t *sync_new(int type, pmpkg_t *spkg, void *data);
void sync_free(pmsyncpkg_t *sync);