summaryrefslogtreecommitdiffstats
path: root/ssl/packet.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-01-27 12:05:52 +0000
committerMatt Caswell <matt@openssl.org>2017-01-30 10:18:24 +0000
commitfed60a781c3da1e91aa90df68f062bf577a2b24a (patch)
treedde6c1dbae995bc077369029659d6278fe54c830 /ssl/packet.c
parent34f7245ba0a5381867e1ea0b7520106218e5bbb1 (diff)
Use for loop in WPACKET_fill_lengths instead of do...while
Based on review feedback Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2259)
Diffstat (limited to 'ssl/packet.c')
-rw-r--r--ssl/packet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ssl/packet.c b/ssl/packet.c
index 87473fbbce..3479f1fed8 100644
--- a/ssl/packet.c
+++ b/ssl/packet.c
@@ -232,12 +232,10 @@ int WPACKET_fill_lengths(WPACKET *pkt)
if (pkt->subs == NULL)
return 0;
- sub = pkt->subs;
- do {
+ for (sub = pkt->subs; sub != NULL; sub = sub->parent) {
if (!wpacket_intern_close(pkt, sub, 0))
return 0;
- sub = sub->parent;
- } while (sub != NULL);
+ }
return 1;
}