diff options
author | 2015-10-20 23:24:25 +0000 | |
---|---|---|
committer | 2015-10-20 23:24:25 +0000 | |
commit | 2e96fb6233d71d00b5fc94b8b9fcba75b0490ebb (patch) | |
tree | c572a227c944c25206c058a94a1524411cf1fa9d /usr.bin/ssh/sshbuf-getput-basic.c | |
parent | tweak previous; (diff) | |
download | wireguard-openbsd-2e96fb6233d71d00b5fc94b8b9fcba75b0490ebb.tar.xz wireguard-openbsd-2e96fb6233d71d00b5fc94b8b9fcba75b0490ebb.zip |
Compare pointers to NULL rather than 0.
ok djm@
Diffstat (limited to 'usr.bin/ssh/sshbuf-getput-basic.c')
-rw-r--r-- | usr.bin/ssh/sshbuf-getput-basic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/sshbuf-getput-basic.c b/usr.bin/ssh/sshbuf-getput-basic.c index 304da2d5a58..72a022a00e8 100644 --- a/usr.bin/ssh/sshbuf-getput-basic.c +++ b/usr.bin/ssh/sshbuf-getput-basic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf-getput-basic.c,v 1.4 2015/01/14 15:02:39 djm Exp $ */ +/* $OpenBSD: sshbuf-getput-basic.c,v 1.5 2015/10/20 23:24:25 mmcc Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -129,7 +129,7 @@ sshbuf_get_string_direct(struct sshbuf *buf, const u_char **valp, size_t *lenp) *lenp = 0; if ((r = sshbuf_peek_string_direct(buf, &p, &len)) < 0) return r; - if (valp != 0) + if (valp != NULL) *valp = p; if (lenp != NULL) *lenp = len; @@ -166,7 +166,7 @@ sshbuf_peek_string_direct(const struct sshbuf *buf, const u_char **valp, SSHBUF_DBG(("SSH_ERR_MESSAGE_INCOMPLETE")); return SSH_ERR_MESSAGE_INCOMPLETE; } - if (valp != 0) + if (valp != NULL) *valp = p + 4; if (lenp != NULL) *lenp = len; @@ -446,7 +446,7 @@ sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf, d++; len--; } - if (valp != 0) + if (valp != NULL) *valp = d; if (lenp != NULL) *lenp = len; |