summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rpmlib.h12
-rw-r--r--lib/stringbuf.c12
-rw-r--r--rpmdb/header.c12
-rw-r--r--rpmio/argv.c12
-rw-r--r--rpmio/macro.c12
-rw-r--r--rpmio/rpmio.c12
-rw-r--r--rpmio/rpmlog.c12
-rw-r--r--rpmio/rpmpgp.c12
-rw-r--r--rpmio/rpmrpc.c13
-rw-r--r--rpmio/url.c12
-rw-r--r--system.h13
11 files changed, 13 insertions, 121 deletions
diff --git a/lib/rpmlib.h b/lib/rpmlib.h
index a574bf869..260bb083c 100644
--- a/lib/rpmlib.h
+++ b/lib/rpmlib.h
@@ -41,18 +41,6 @@ extern int rpmFLAGS;
extern "C" {
#endif
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @return NULL always
- */
-static inline
-void * _free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
/** \ingroup rpmtrans
* The RPM Transaction Set.
* Transaction sets are inherently unordered! RPM may reorder transaction
diff --git a/lib/stringbuf.c b/lib/stringbuf.c
index bc85715f9..fbb956716 100644
--- a/lib/stringbuf.c
+++ b/lib/stringbuf.c
@@ -23,18 +23,6 @@ static inline int xisspace(int c) {
return (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == '\v');
}
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @return NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
StringBuf newStringBuf(void)
{
StringBuf sb = xmalloc(sizeof(*sb));
diff --git a/rpmdb/header.c b/rpmdb/header.c
index cd1d7df29..645fbb4e6 100644
--- a/rpmdb/header.c
+++ b/rpmdb/header.c
@@ -108,18 +108,6 @@ static size_t headerMaxbytes = (32*1024*1024);
HV_t hdrVec; /* forward reference */
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @return NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
/** \ingroup header
* Reference a header instance.
* @param h header
diff --git a/rpmio/argv.c b/rpmio/argv.c
index d112dfbc2..64cfd64c2 100644
--- a/rpmio/argv.c
+++ b/rpmio/argv.c
@@ -8,18 +8,6 @@
#include "debug.h"
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @return NULL always
- */
-static inline
-void * _free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
void argvPrint(const char * msg, ARGV_t argv, FILE * fp)
{
ARGV_t av;
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 7d6b89208..fd18b2473 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -90,18 +90,6 @@ int print_expand_trace = _PRINT_EXPAND_TRACE;
/* forward ref */
static int expandMacro(MacroBuf mb);
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @retval NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
/* =============================================================== */
/**
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index f7ab21d6f..a565c6471 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -70,18 +70,6 @@ int noLibio = 1;
*/
int _rpmio_debug = 0;
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @retval NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
/* =============================================================== */
static const char * fdbg(FD_t fd)
diff --git a/rpmio/rpmlog.c b/rpmio/rpmlog.c
index ed2091ee9..06710add9 100644
--- a/rpmio/rpmlog.c
+++ b/rpmio/rpmlog.c
@@ -23,18 +23,6 @@
static int nrecs = 0;
static rpmlogRec recs = NULL;
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @retval NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
int rpmlogGetNrecs(void)
{
return nrecs;
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
index 353f826da..1335d31cb 100644
--- a/rpmio/rpmpgp.c
+++ b/rpmio/rpmpgp.c
@@ -173,18 +173,6 @@ struct pgpValTbl_s pgpArmorKeyTbl[] = {
{ -1, "Unknown armor key" }
};
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @return NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
static void pgpPrtNL(void)
{
if (!_print) return;
diff --git a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c
index 3e639a262..6bf1fb28c 100644
--- a/rpmio/rpmrpc.c
+++ b/rpmio/rpmrpc.c
@@ -13,19 +13,6 @@
#include "ugid.h"
#include "debug.h"
-
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @retval NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
/* =============================================================== */
int Mkdir (const char * path, mode_t mode)
{
diff --git a/rpmio/url.c b/rpmio/url.c
index 8f5e8583a..1cc845581 100644
--- a/rpmio/url.c
+++ b/rpmio/url.c
@@ -31,18 +31,6 @@ int _url_debug = 0;
#define URLDBG(_f, _m, _x) if ((_url_debug | (_f)) & (_m)) fprintf _x
-/**
- * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
- * @param p memory to free
- * @retval NULL always
- */
-static inline void *
-_free(const void * p)
-{
- if (p != NULL) free((void *)p);
- return NULL;
-}
-
urlinfo urlNew()
{
urlinfo u;
diff --git a/system.h b/system.h
index 3d7dd4a06..10d9e0634 100644
--- a/system.h
+++ b/system.h
@@ -233,6 +233,19 @@ typedef char * security_context_t;
#define rpm_execcon(_v, _fn, _av, _envp) (0)
#endif
+/**
+ * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
+ * @param p memory to free
+ * @return NULL always
+ */
+static inline
+void * _free(const void * p)
+{
+ if (p != NULL) free((void *)p);
+ return NULL;
+}
+
+
/* FIX: these are macros */
/**
*/