diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-27 18:03:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-27 18:03:38 +0000 |
commit | 2fc3f2b1c35e38cea5062540da864e5c6083c4ec (patch) | |
tree | 896dd1804f62ec4576a5b845767f9eec7630c40b /usr.bin/ssh/hostfile.c | |
parent | 32cade518fa1930ef2acf6d3220fc6bf6d36f24e (diff) |
Some asprintf() calls were checked < 0, rather than the precise == -1.
ok millert nicm tb, etc
Diffstat (limited to 'usr.bin/ssh/hostfile.c')
-rw-r--r-- | usr.bin/ssh/hostfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c index 9dc64b731b6..d73fe690ec5 100644 --- a/usr.bin/ssh/hostfile.c +++ b/usr.bin/ssh/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.73 2018/07/16 03:09:13 djm Exp $ */ +/* $OpenBSD: hostfile.c,v 1.74 2019/06/27 18:03:37 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -542,8 +542,8 @@ hostfile_replace_entries(const char *filename, const char *host, const char *ip, /* * Prepare temporary file for in-place deletion. */ - if ((r = asprintf(&temp, "%s.XXXXXXXXXXX", filename)) < 0 || - (r = asprintf(&back, "%s.old", filename)) < 0) { + if ((r = asprintf(&temp, "%s.XXXXXXXXXXX", filename)) = -1 || + (r = asprintf(&back, "%s.old", filename)) == -1) { r = SSH_ERR_ALLOC_FAIL; goto fail; } |