summaryrefslogtreecommitdiffstats
path: root/include/xalloc.h
diff options
context:
space:
mode:
authorManuel Bentele2019-08-21 14:58:42 +0200
committerManuel Bentele2019-08-21 14:58:42 +0200
commit0692b963aa3cb846d8abab5ef5247c4dbb3fec96 (patch)
treef13776d25da3e1adc1445aef22e7566ac98cbe84 /include/xalloc.h
parentlosetup: added file format option to the man page (diff)
parentpartx: document -d vs. --nr and fix test (diff)
downloadkernel-qcow2-util-linux-kernel-qcow2.tar.gz
kernel-qcow2-util-linux-kernel-qcow2.tar.xz
kernel-qcow2-util-linux-kernel-qcow2.zip
lib/losetup: merge remote-tracking branch 'util-linux/master'kernel-qcow2
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
Diffstat (limited to 'include/xalloc.h')
-rw-r--r--include/xalloc.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/xalloc.h b/include/xalloc.h
index 0129a85e2..48712a452 100644
--- a/include/xalloc.h
+++ b/include/xalloc.h
@@ -62,8 +62,7 @@ static inline char __attribute__((warn_unused_result)) __ul_returns_nonnull
{
char *ret;
- if (!str)
- return NULL;
+ assert(str);
ret = strdup(str);
@@ -77,8 +76,7 @@ xstrndup(const char *str, size_t size)
{
char *ret;
- if (!str)
- return NULL;
+ assert(str);
ret = strndup(str, size);