From fb174716732d4da0319639a7a13d6ef0a2115a84 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:03:48 +0900 Subject: [PATCH] netutils/webclient: Fix the coding style --- netutils/webclient/webclient.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index feaa9235b..d16db2f07 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -428,7 +428,9 @@ static inline int wget_parsestatus(struct webclient_context *ctx, DEBUGASSERT(strlen(g_http10) == 8); DEBUGASSERT(strlen(g_http11) == 8); - if (ws->line[8] != ' ') /* SP before the status-code */ + /* SP before the status-code */ + + if (ws->line[8] != ' ') { return -EINVAL; } @@ -443,7 +445,9 @@ static inline int wget_parsestatus(struct webclient_context *ctx, return -EINVAL; } - if (*ep != ' ') /* SP before reason-phrase */ + /* SP before reason-phrase */ + + if (*ep != ' ') { return -EINVAL; } @@ -598,7 +602,10 @@ static inline int wget_parseheaders(struct webclient_context *ctx, */ found = false; - if (ndx > 0) /* Should always be true */ + + /* Should always be true */ + + if (ndx > 0) { ninfo("Got HTTP header line%s: %.*s\n", got_nl ? "" : " (truncated)", @@ -817,7 +824,9 @@ static inline int wget_parsechunkheader(struct webclient_context *ctx, * our buffer is already full, so we start parsing it. */ - if (ndx > 0) /* Should always be true */ + /* Should always be true */ + + if (ndx > 0) { FAR char *semicolon;