summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-19 00:30:44 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-19 00:30:44 -0800
commitc6b02069954ef83f8766d6a157b0a95939523d32 (patch)
tree29ad7cd4fc5bf533cabe6de6d3627ae025b43adf
parentc44cb256ce8660c9d529374b7596531dad1a5376 (diff)
Remove unnecessary Realloc wrapper
The one caller already checks for and handles failure, so having a wrapper that just adds another check for allocation failure isn't useful. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--misc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/misc.c b/misc.c
index f4dbb57..d5d8b43 100644
--- a/misc.c
+++ b/misc.c
@@ -78,22 +78,6 @@ MallocFailed(void)
exit(1);
}
-static char*
-Realloc(
- char *p,
- int s)
-{
- if (!p)
- p = malloc(s);
- else
- p = realloc(p, s);
-
- if (!p)
- MallocFailed();
-
- return p;
-}
-
static void
BadMalloc(
int line)
@@ -215,7 +199,7 @@ doInitNewRule(
if (rule_number == config_info->lines_allocated)
{
if ((config_info->config_file_data = (struct config_line**)
- Realloc((char*)config_info->config_file_data,
+ realloc((char*)config_info->config_file_data,
(config_info->lines_allocated += ADD_LINES) *
sizeof(struct config_line *))) == NULL)
{