summaryrefslogtreecommitdiff
path: root/minecctl/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'minecctl/misc.c')
-rw-r--r--minecctl/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/minecctl/misc.c b/minecctl/misc.c
index 26cbc86..90189dc 100644
--- a/minecctl/misc.c
+++ b/minecctl/misc.c
@@ -335,7 +335,7 @@ char *__xstrndup(const char *fn, int line, const char *s, size_t n)
"invalid arguments");
ptr = strndup(s, n);
- if (ptr)
+ if (!ptr)
die("strdup: %m");
return ptr;
}