From 78e8090842bbd3123a58629e94d30144954f6ef4 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Fri, 7 Aug 2020 14:13:56 +0900 Subject: [PATCH] examples: wget: Fix nxstyle issues --- examples/wget/wget_main.c | 6 ++++-- netutils/webclient/webclient.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/wget/wget_main.c b/examples/wget/wget_main.c index 1f3897bf0..3b634d923 100644 --- a/examples/wget/wget_main.c +++ b/examples/wget/wget_main.c @@ -53,7 +53,8 @@ * Preprocessor Definitions ****************************************************************************/ -/* Configuration Checks ******************************************************/ +/* Configuration Checks *****************************************************/ + /* BEWARE: * There are other configuration settings needed in netutitls/wget/wgetc.s, * but there are default values for those so we cannot check them here. @@ -88,6 +89,7 @@ static char g_iobuffer[512]; /**************************************************************************** * Private Functions ****************************************************************************/ + /**************************************************************************** * Name: callback ****************************************************************************/ @@ -114,7 +116,7 @@ int main(int argc, FAR char *argv[]) uint8_t mac[IFHWADDRLEN]; #endif -/* Many embedded network interfaces must have a software assigned MAC */ + /* Many embedded network interfaces must have a software assigned MAC */ #ifdef CONFIG_EXAMPLES_WGET_NOMAC mac[0] = 0x00; diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index 8773f1131..0a70d0e7e 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -666,9 +666,10 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, nerr("ERROR: send failed: %d\n", errno); goto errout; } + len -= ret; } - while(len > 0); + while (len > 0); /* Now loop to get the file sent in response to the GET. This * loop continues until either we read the end of file (nbytes == 0)