From fed60a781c3da1e91aa90df68f062bf577a2b24a Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 27 Jan 2017 12:05:52 +0000 Subject: [PATCH] Use for loop in WPACKET_fill_lengths instead of do...while Based on review feedback Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2259) --- ssl/packet.c | 6 ++---- 1 file 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; } -- 2.40.0