diff options
-rw-r--r-- | usr.bin/cvs/xmalloc.c | 4 | ||||
-rw-r--r-- | usr.bin/diff/xmalloc.c | 4 | ||||
-rw-r--r-- | usr.bin/file/xmalloc.c | 4 | ||||
-rw-r--r-- | usr.bin/less/main.c | 2 | ||||
-rw-r--r-- | usr.bin/rcs/xmalloc.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/auth2.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/xmalloc.c | 4 |
7 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/cvs/xmalloc.c b/usr.bin/cvs/xmalloc.c index 47f94f8f7f8..501072df327 100644 --- a/usr.bin/cvs/xmalloc.c +++ b/usr.bin/cvs/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.13 2015/11/17 18:25:02 tobias Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.14 2019/06/28 05:44:09 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -85,7 +85,7 @@ xasprintf(char **ret, const char *fmt, ...) i = vasprintf(ret, fmt, ap); va_end(ap); - if (i < 0 || *ret == NULL) + if (i == -1) fatal("xasprintf: %s", strerror(errno)); return i; diff --git a/usr.bin/diff/xmalloc.c b/usr.bin/diff/xmalloc.c index a17c3fe5783..ce0f4545aee 100644 --- a/usr.bin/diff/xmalloc.c +++ b/usr.bin/diff/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.9 2015/11/17 18:25:02 tobias Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.10 2019/06/28 05:44:09 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -78,7 +78,7 @@ xasprintf(char **ret, const char *fmt, ...) i = vasprintf(ret, fmt, ap); va_end(ap); - if (i < 0 || *ret == NULL) + if (i == -1) err(2, "xasprintf"); return i; diff --git a/usr.bin/file/xmalloc.c b/usr.bin/file/xmalloc.c index 5c145045476..c05b08fedbe 100644 --- a/usr.bin/file/xmalloc.c +++ b/usr.bin/file/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.3 2015/11/17 18:25:03 tobias Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.4 2019/06/28 05:44:09 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -80,7 +80,7 @@ xasprintf(char **ret, const char *fmt, ...) i = vasprintf(ret, fmt, ap); va_end(ap); - if (i < 0 || *ret == NULL) + if (i == -1) err(1, "xasprintf"); return i; diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c index 5fc7f131803..9820eb5903f 100644 --- a/usr.bin/less/main.c +++ b/usr.bin/less/main.c @@ -303,7 +303,7 @@ easprintf(const char *fmt, ...) rv = vasprintf(&p, fmt, ap); va_end(ap); - if (p == NULL || rv < 0) { + if (rv == -1) { error("Cannot allocate memory", NULL); quit(QUIT_ERROR); } diff --git a/usr.bin/rcs/xmalloc.c b/usr.bin/rcs/xmalloc.c index fa130b37ee3..b62842c8f07 100644 --- a/usr.bin/rcs/xmalloc.c +++ b/usr.bin/rcs/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.11 2015/11/17 18:25:03 tobias Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.12 2019/06/28 05:44:09 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -80,7 +80,7 @@ xasprintf(char **ret, const char *fmt, ...) i = vasprintf(ret, fmt, ap); va_end(ap); - if (i < 0 || *ret == NULL) + if (i == -1) err(1, "xasprintf"); return i; diff --git a/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c index 2f372d1456e..7ab1a832730 100644 --- a/usr.bin/ssh/auth2.c +++ b/usr.bin/ssh/auth2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.155 2019/03/25 22:34:52 djm Exp $ */ +/* $OpenBSD: auth2.c,v 1.156 2019/06/28 05:44:09 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -668,7 +668,7 @@ auth2_record_info(Authctxt *authctxt, const char *fmt, ...) i = vasprintf(&authctxt->auth_method_info, fmt, ap); va_end(ap); - if (i < 0 || authctxt->auth_method_info == NULL) + if (i == -1) fatal("%s: vasprintf failed", __func__); } diff --git a/usr.bin/tmux/xmalloc.c b/usr.bin/tmux/xmalloc.c index 367db15ea52..0871b7c7e19 100644 --- a/usr.bin/tmux/xmalloc.c +++ b/usr.bin/tmux/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.11 2016/11/17 10:06:08 nicm Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.12 2019/06/28 05:44:09 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -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; |