You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 02:44:36 UTC
[incubator-nuttx-apps] 03/07: netutils/ftpc/ftpc_putfile.c: Appease
nxstyle
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 2a3f2ea8c6cebf6fca3f4c6e37ed5affce5884e5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:29:18 2020 +0900
netutils/ftpc/ftpc_putfile.c: Appease nxstyle
---
netutils/ftpc/ftpc_putfile.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c
index b138146..17bde8a 100644
--- a/netutils/ftpc/ftpc_putfile.c
+++ b/netutils/ftpc/ftpc_putfile.c
@@ -87,11 +87,12 @@ static int ftpc_sendbinary(FAR struct ftpc_session_s *session,
/* Loop until the entire file is sent */
- for (;;)
+ for (; ; )
{
/* Read data from the file */
- nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE, linstream);
+ nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE,
+ linstream);
if (nread <= 0)
{
/* nread == 0 is just EOF */
@@ -271,13 +272,14 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path,
{
if (*str == '\'')
{
- rname = strndup(str+1, len-3);
+ rname = strndup(str + 1, len - 3);
}
else
{
- rname = strndup(str, len-1);
+ rname = strndup(str, len - 1);
ninfo("Unique filename is: %s\n", rname);
}
+
free(rname);
}
}