diff options
author | Adam Jackson <ajax@redhat.com> | 2014-07-08 13:24:25 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2014-07-29 09:51:50 -0400 |
commit | cad9b053d52f62432dfd70e42e0240de77027cae (patch) | |
tree | a629b802dd1ed86a8c36e83bac3eaa2829f6477d /os | |
parent | d5b279977236c4f80a8ba81db1f81a314484facf (diff) |
os: Remove deprecated malloc/free wrappers
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os')
-rw-r--r-- | os/utils.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/os/utils.c b/os/utils.c index ed7581e1c..f3197430a 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1090,24 +1090,6 @@ set_font_authorizations(char **authorizations, int *authlen, void *client) } void * -Xalloc(unsigned long amount) -{ - /* - * Xalloc used to return NULL when large amount of memory is requested. In - * order to catch the buggy callers this warning has been added, slated to - * removal by anyone who touches this code (or just looks at it) in 2011. - * - * -- Mikhail Gusarov - */ - if ((long) amount <= 0) - ErrorF("Warning: Xalloc: " - "requesting unpleasantly large amount of memory: %lu bytes.\n", - amount); - - return malloc(amount); -} - -void * XNFalloc(unsigned long amount) { void *ptr = malloc(amount); @@ -1118,12 +1100,6 @@ XNFalloc(unsigned long amount) } void * -Xcalloc(unsigned long amount) -{ - return calloc(1, amount); -} - -void * XNFcalloc(unsigned long amount) { void *ret = calloc(1, amount); @@ -1134,24 +1110,6 @@ XNFcalloc(unsigned long amount) } void * -Xrealloc(void *ptr, unsigned long amount) -{ - /* - * Xrealloc used to return NULL when large amount of memory is requested. In - * order to catch the buggy callers this warning has been added, slated to - * removal by anyone who touches this code (or just looks at it) in 2011. - * - * -- Mikhail Gusarov - */ - if ((long) amount <= 0) - ErrorF("Warning: Xrealloc: " - "requesting unpleasantly large amount of memory: %lu bytes.\n", - amount); - - return realloc(ptr, amount); -} - -void * XNFrealloc(void *ptr, unsigned long amount) { void *ret = realloc(ptr, amount); @@ -1161,12 +1119,6 @@ XNFrealloc(void *ptr, unsigned long amount) return ret; } -void -Xfree(void *ptr) -{ - free(ptr); -} - char * Xstrdup(const char *s) { |