diff options
author | Roy Marples <roy@marples.name> | 2007-10-04 17:26:57 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-04 17:26:57 +0000 |
commit | a6f2713002db20cd65618c1140ed7d3fbbbb9292 (patch) | |
tree | 09e8ad5903ba7472f5f01e410550e2e9c79367db /src/librc-misc.c | |
parent | af5525f6342c6ceda5913d2f6675d72ea8501ef3 (diff) |
inline rc_xmalloc, rc_xrealloc and rc_xstrdup so that the library doesn't expose them.
Diffstat (limited to 'src/librc-misc.c')
-rw-r--r-- | src/librc-misc.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/librc-misc.c b/src/librc-misc.c index 936fc730..f255f706 100644 --- a/src/librc-misc.c +++ b/src/librc-misc.c @@ -6,7 +6,6 @@ #include "librc.h" -#define ERRX fprintf (stderr, "out of memory\n"); exit (1) #define PROFILE_ENV "/etc/profile.env" #define SYS_WHITELIST RC_LIBDIR "/conf.d/env_whitelist" @@ -15,43 +14,6 @@ #define PATH_PREFIX RC_LIBDIR "/bin:/bin:/sbin:/usr/bin:/usr/sbin" -void *rc_xmalloc (size_t size) -{ - void *value = malloc (size); - - if (value) - return (value); - - ERRX; -} -librc_hidden_def(rc_xmalloc) - -void *rc_xrealloc (void *ptr, size_t size) -{ - void *value = realloc (ptr, size); - - if (value) - return (value); - - ERRX; -} -librc_hidden_def(rc_xrealloc) - -char *rc_xstrdup (const char *str) -{ - char *value; - - if (! str) - return (NULL); - - value = strdup (str); - - if (value) - return (value); - - ERRX; -} -librc_hidden_def(rc_xstrdup) bool rc_env_bool (const char *var) { |