diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-12-31 07:13:17 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-12-31 09:52:26 -0500 |
commit | c9f9ef7dc32c851b44f51b67912cf2d9a48b108f (patch) | |
tree | 4dc4420892900cd2799918055ccd517fb28eb039 /libsandbox/canonicalize.c | |
parent | libsandbox/libsbutil: link with -no-undefined (diff) | |
download | sandbox-c9f9ef7dc32c851b44f51b67912cf2d9a48b108f.tar.gz sandbox-c9f9ef7dc32c851b44f51b67912cf2d9a48b108f.tar.bz2 sandbox-c9f9ef7dc32c851b44f51b67912cf2d9a48b108f.zip |
libsbutil: cleanup x* memory functions
Pull the x* memory functions out of rcscripts and into libsbutil and change
their style to match the rest of sbutil. Also add xzalloc() and xstrdup(),
and convert pointless strndup() usage to strdup().
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox/canonicalize.c')
-rw-r--r-- | libsandbox/canonicalize.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libsandbox/canonicalize.c b/libsandbox/canonicalize.c index e0eec98..b88c46f 100644 --- a/libsandbox/canonicalize.c +++ b/libsandbox/canonicalize.c @@ -76,8 +76,6 @@ erealpath(const char *name, char *resolved) if (resolved == NULL) { rpath = xmalloc(path_max); - if (rpath == NULL) - return NULL; } else rpath = resolved; rpath_limit = rpath + path_max; @@ -133,8 +131,6 @@ erealpath(const char *name, char *resolved) else new_size += path_max; new_rpath = (char *) xrealloc(rpath, new_size); - if (new_rpath == NULL) - goto error; rpath = new_rpath; rpath_limit = rpath + new_size; |