diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-10-20 23:24:25 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-10-25 11:42:04 +1100 |
commit | 7d6c0362039ceacdc1366b5df29ad5d2693c13e5 (patch) | |
tree | d87b5de914604d6828303de6e5b0f3aa3d9258d2 /sshbuf-getput-basic.c | |
parent | f98a09cacff7baad8748c9aa217afd155a4d493f (diff) |
upstream commit
Compare pointers to NULL rather than 0.
ok djm@
Upstream-ID: 21616cfea27eda65a06e772cc887530b9a1a27f8
Diffstat (limited to 'sshbuf-getput-basic.c')
-rw-r--r-- | sshbuf-getput-basic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c index 8ff8a0a28..23e0fd7c1 100644 --- a/sshbuf-getput-basic.c +++ b/sshbuf-getput-basic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshbuf-getput-basic.c,v 1.4 2015/01/14 15:02:39 djm Exp $ */ | 1 | /* $OpenBSD: sshbuf-getput-basic.c,v 1.5 2015/10/20 23:24:25 mmcc Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller | 3 | * Copyright (c) 2011 Damien Miller |
4 | * | 4 | * |
@@ -131,7 +131,7 @@ sshbuf_get_string_direct(struct sshbuf *buf, const u_char **valp, size_t *lenp) | |||
131 | *lenp = 0; | 131 | *lenp = 0; |
132 | if ((r = sshbuf_peek_string_direct(buf, &p, &len)) < 0) | 132 | if ((r = sshbuf_peek_string_direct(buf, &p, &len)) < 0) |
133 | return r; | 133 | return r; |
134 | if (valp != 0) | 134 | if (valp != NULL) |
135 | *valp = p; | 135 | *valp = p; |
136 | if (lenp != NULL) | 136 | if (lenp != NULL) |
137 | *lenp = len; | 137 | *lenp = len; |
@@ -168,7 +168,7 @@ sshbuf_peek_string_direct(const struct sshbuf *buf, const u_char **valp, | |||
168 | SSHBUF_DBG(("SSH_ERR_MESSAGE_INCOMPLETE")); | 168 | SSHBUF_DBG(("SSH_ERR_MESSAGE_INCOMPLETE")); |
169 | return SSH_ERR_MESSAGE_INCOMPLETE; | 169 | return SSH_ERR_MESSAGE_INCOMPLETE; |
170 | } | 170 | } |
171 | if (valp != 0) | 171 | if (valp != NULL) |
172 | *valp = p + 4; | 172 | *valp = p + 4; |
173 | if (lenp != NULL) | 173 | if (lenp != NULL) |
174 | *lenp = len; | 174 | *lenp = len; |
@@ -448,7 +448,7 @@ sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf, | |||
448 | d++; | 448 | d++; |
449 | len--; | 449 | len--; |
450 | } | 450 | } |
451 | if (valp != 0) | 451 | if (valp != NULL) |
452 | *valp = d; | 452 | *valp = d; |
453 | if (lenp != NULL) | 453 | if (lenp != NULL) |
454 | *lenp = len; | 454 | *lenp = len; |