diff options
author | deraadt <deraadt> | 2019-06-28 05:44:09 +0000 |
---|---|---|
committer | deraadt <deraadt> | 2019-06-28 05:44:09 +0000 |
commit | 6ce38b73956836c26c8914cdf5002da7900a5d2d (patch) | |
tree | 9b54834d334e21cf396da47f091fea2ccb2eb6e0 | |
parent | b434692db20e6ef279ca13b6d25b0d519ac2c134 (diff) | |
download | rtmux-6ce38b73956836c26c8914cdf5002da7900a5d2d.tar.gz rtmux-6ce38b73956836c26c8914cdf5002da7900a5d2d.tar.bz2 rtmux-6ce38b73956836c26c8914cdf5002da7900a5d2d.zip |
asprintf returns -1, not an arbitrary value < 0. Also upon error the
(very sloppy specification) leaves an undefined value in *ret, so it is
wrong to inspect it, the error condition is enough.
discussed a little with nicm, and then much more with millert until we
were exasperated
-rw-r--r-- | xmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -111,7 +111,7 @@ xvasprintf(char **ret, const char *fmt, va_list ap) i = vasprintf(ret, fmt, ap); - if (i < 0 || *ret == NULL) + if (i == -1) fatalx("xasprintf: %s", strerror(errno)); return i; |