netutils/ftpc/ftpc_getfile.c: Appease nxstyle

This commit is contained in:
YAMAMOTO Takashi 2020-11-25 07:27:01 +09:00 committed by Xiang Xiao
parent 24b6f9199a
commit f83caca9ac

View File

@ -78,7 +78,8 @@
*
****************************************************************************/
static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path,
static int ftpc_recvinit(struct ftpc_session_s *session,
FAR const char *path,
uint8_t xfrmode, off_t offset)
{
int ret;
@ -184,7 +185,8 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session,
{
/* Read the data from the socket */
nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE, rinstream);
nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE,
rinstream);
if (nread <= 0)
{
/* nread < 0 is an error */
@ -234,7 +236,8 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session,
*
****************************************************************************/
int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
int ftpc_getfile(SESSION handle, FAR const char *rname,
FAR const char *lname,
uint8_t how, uint8_t xfrmode)
{
FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)handle;
@ -312,7 +315,8 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
goto errout_with_abspath;
}
loutstream = fopen(abslpath, (offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w");
loutstream = fopen(abslpath,
(offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w");
if (!loutstream)
{
nerr("ERROR: fopen failed: %d\n", errno);