diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-19 00:30:44 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-19 00:30:44 -0800 |
commit | c6b02069954ef83f8766d6a157b0a95939523d32 (patch) | |
tree | 29ad7cd4fc5bf533cabe6de6d3627ae025b43adf | |
parent | c44cb256ce8660c9d529374b7596531dad1a5376 (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.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -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) { |