summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-09-16 15:28:57 -0400
committerRichard Levitte <levitte@openssl.org>2019-10-09 21:32:15 +0200
commit12a765a5235f181c2f4992b615eb5f892c368e88 (patch)
tree67ece1a3fb210bd4895aea73649773fc912a60d6 /test
parent3a4e43de473ee80347036d78163889b6b1221210 (diff)
Explicitly test against NULL; do not use !p or similar
Also added blanks lines after declarations in a couple of places. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9916)
Diffstat (limited to 'test')
-rw-r--r--test/handshake_helper.c2
-rw-r--r--test/testutil/stanza.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/handshake_helper.c b/test/handshake_helper.c
index c2528b9e1e..e8249a7ce2 100644
--- a/test/handshake_helper.c
+++ b/test/handshake_helper.c
@@ -877,7 +877,7 @@ static void do_app_data_step(PEER *peer)
* to read gives us somewhat better guarantees that all data sent is in fact
* received.
*/
- if (!peer->bytes_to_write && !peer->bytes_to_read) {
+ if (peer->bytes_to_write == 0 && peer->bytes_to_read == 0) {
peer->status = PEER_SUCCESS;
}
}
diff --git a/test/testutil/stanza.c b/test/testutil/stanza.c
index e28362025a..ba62f84517 100644
--- a/test/testutil/stanza.c
+++ b/test/testutil/stanza.c
@@ -72,7 +72,7 @@ static char *strip_spaces(char *p)
/* Skip over leading spaces */
while (*p && isspace((unsigned char)*p))
p++;
- if (!*p)
+ if (*p == '\0')
return NULL;
for (q = p + strlen(p) - 1; q != p && isspace((unsigned char)*q); )