summaryrefslogtreecommitdiffstats
path: root/include/xalloc.h
diff options
context:
space:
mode:
authorDave Reisner2011-09-29 20:56:42 +0200
committerKarel Zak2011-09-30 00:24:16 +0200
commit12218ccde2d422ed425b7a5b0d9ab81769148419 (patch)
tree3cf064865a768822e7eca8c31144b2d2b64da308 /include/xalloc.h
parentinclude,xalloc: check for NULL before calling strdup (diff)
downloadkernel-qcow2-util-linux-12218ccde2d422ed425b7a5b0d9ab81769148419.tar.gz
kernel-qcow2-util-linux-12218ccde2d422ed425b7a5b0d9ab81769148419.tar.xz
kernel-qcow2-util-linux-12218ccde2d422ed425b7a5b0d9ab81769148419.zip
include,xalloc: fix whitespace to be consistent
We use spaces for the rest of this file, so the random tabs within xstrdup stand out. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'include/xalloc.h')
-rw-r--r--include/xalloc.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/xalloc.h b/include/xalloc.h
index bea7e3194..feeb1144f 100644
--- a/include/xalloc.h
+++ b/include/xalloc.h
@@ -51,16 +51,16 @@ void *xcalloc(const size_t nelems, const size_t size)
static inline char *xstrdup(const char *str)
{
- char *ret;
+ char *ret;
- if (!str)
- return NULL;
+ if (!str)
+ return NULL;
- ret = strdup(str);
+ ret = strdup(str);
- if (!ret)
- err(XALLOC_EXIT_CODE, "cannot duplicate string");
- return ret;
+ if (!ret)
+ err(XALLOC_EXIT_CODE, "cannot duplicate string");
+ return ret;
}
#endif