summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-01-04 13:46:43 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-01-04 13:46:43 +0200
commit60dc809db136e8bba12a9d45e189248218e304cb (patch)
tree2e3a52b0e6f88b9893763683114a42b3030938d0 /misc
parent216cf2acb664e8d7f8a47857a942adba43d0fec2 (diff)
downloadrpm-60dc809db136e8bba12a9d45e189248218e304cb.tar.gz
rpm-60dc809db136e8bba12a9d45e189248218e304cb.tar.bz2
rpm-60dc809db136e8bba12a9d45e189248218e304cb.zip
Eliminate myrealloc() replacement function
- realloc(NULL, size) is defined as equal to malloc(size) in C99 and POSIX 2001, we dont care about anything older than that
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile.am2
-rw-r--r--misc/myrealloc.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/misc/Makefile.am b/misc/Makefile.am
index eb921ee08..b84eea4ce 100644
--- a/misc/Makefile.am
+++ b/misc/Makefile.am
@@ -8,7 +8,7 @@ EXTRA_DIST = \
fakefork.c fnmatch.c fnmatch.h \
getcwd.c getmntent.c \
getwd.c glob.c glob.h \
- myrealloc.c putenv.c realpath.c \
+ putenv.c realpath.c \
setenv.c stpcpy.c stpncpy.c
noinst_LTLIBRARIES = libmisc.la
diff --git a/misc/myrealloc.c b/misc/myrealloc.c
deleted file mode 100644
index 1b93c17bf..000000000
--- a/misc/myrealloc.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "system.h"
-
-void *myrealloc(void *ptr, size_t size) {
-if (ptr == NULL)
- return malloc(size);
- else
- return realloc(ptr, size);
-}