From 9eea62fbc6754d33a6cdf74f779025cab6ed6b42 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 May 2012 22:52:05 -0500 Subject: [PATCH] pkg: LOCAL_COPY() becomes PKG_LOCAL_COPY(). --- pkg.c | 4 ++-- pkg.h | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pkg.c b/pkg.c index 3ef305c..c6646c9 100644 --- a/pkg.c +++ b/pkg.c @@ -224,8 +224,8 @@ pkg_compare_version(const char *a, const char *b) if (!strcasecmp(a, b)) return 0; - str1 = LOCAL_COPY(a); - str2 = LOCAL_COPY(b); + str1 = PKG_LOCAL_COPY(a); + str2 = PKG_LOCAL_COPY(b); one = str1; two = str2; diff --git a/pkg.h b/pkg.h index a7230e6..da03c24 100644 --- a/pkg.h +++ b/pkg.h @@ -62,16 +62,11 @@ typedef struct pkg_fragment_ pkg_fragment_t; #define foreach_list_entry_safe(head, nextiter, value) \ for ((value) = (head), (nextiter) = (head) != NULL ? (head)->next : NULL; (value) != NULL; (value) = (nextiter), (nextiter) = (nextiter) != NULL ? (nextiter)->next : NULL) -#define LOCAL_COPY(a) \ +#define PKG_LOCAL_COPY(a) \ strcpy(alloca(strlen(a) + 1), a) -#ifndef MIN -# define MIN(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -#ifndef MAX -# define MAX(a,b) (((a) > (b)) ? (a) : (b)) -#endif +#define PKG_MIN(a,b) (((a) < (b)) ? (a) : (b)) +#define PKG_MAX(a,b) (((a) > (b)) ? (a) : (b)) struct pkg_fragment_ { struct pkg_fragment_ *prev, *next;