summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-21 13:41:25 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-21 13:41:25 +0300
commita82633c2a3dd15d00d4c076d6527581aa5dcf57d (patch)
tree30990a493cd7f5f1c7812661963bf1ea16cda491
parent892bf4eb8637fae5e2da2012f5257d836d7a61d8 (diff)
downloadrpm-a82633c2a3dd15d00d4c076d6527581aa5dcf57d.tar.gz
rpm-a82633c2a3dd15d00d4c076d6527581aa5dcf57d.tar.bz2
rpm-a82633c2a3dd15d00d4c076d6527581aa5dcf57d.zip
Avoid using void pointer when we have a real type for the memfail function
-rw-r--r--rpmio/rpmmalloc.c4
-rw-r--r--rpmio/rpmutil.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/rpmio/rpmmalloc.c b/rpmio/rpmmalloc.c
index 68aa246c5..c38ab96ac 100644
--- a/rpmio/rpmmalloc.c
+++ b/rpmio/rpmmalloc.c
@@ -29,9 +29,9 @@ static void *vmefail(size_t size)
return val;
}
-void * rpmSetMemFail(rpmMemFailFunc func, void *data)
+rpmMemFailFunc rpmSetMemFail(rpmMemFailFunc func, void *data)
{
- void *ofunc = failfunc;
+ rpmMemFailFunc ofunc = failfunc;
failfunc = func;
failfunc_data = data;
return ofunc;
diff --git a/rpmio/rpmutil.h b/rpmio/rpmutil.h
index 7f22f6468..7c4af9353 100644
--- a/rpmio/rpmutil.h
+++ b/rpmio/rpmutil.h
@@ -146,6 +146,6 @@ typedef void * (*rpmMemFailFunc) (size_t size, void *data);
* @param data User data (or NULL)
* @return Previous callback function
*/
-void * rpmSetMemFail(rpmMemFailFunc func, void *data);
+rpmMemFailFunc rpmSetMemFail(rpmMemFailFunc func, void *data);
#endif /* _RPMUTIL_H */