upstream commit

Compare pointers to NULL rather than 0.

ok djm@

Upstream-ID: 21616cfea27eda65a06e772cc887530b9a1a27f8
This commit is contained in:
mmcc@openbsd.org
2015-10-20 23:24:25 +00:00
committed by Damien Miller
parent f98a09cacf
commit 7d6c036203
3 changed files with 9 additions and 9 deletions

View File

@@ -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
*
@@ -131,7 +131,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;
@@ -168,7 +168,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;
@@ -448,7 +448,7 @@ sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf,
d++;
len--;
}
if (valp != 0)
if (valp != NULL)
*valp = d;
if (lenp != NULL)
*lenp = len;