Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
bf4c36c83f
commit
ebf37162ed
@ -114,14 +114,16 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
|||||||
case TELNET_WILL:
|
case TELNET_WILL:
|
||||||
case TELNET_WONT:
|
case TELNET_WONT:
|
||||||
ch = ftpc_sockgetc(&session->cmd);
|
ch = ftpc_sockgetc(&session->cmd);
|
||||||
ftpc_sockprintf(&session->cmd, "%c%c%c", TELNET_IAC, TELNET_DONT, ch);
|
ftpc_sockprintf(&session->cmd, "%c%c%c",
|
||||||
|
TELNET_IAC, TELNET_DONT, ch);
|
||||||
ftpc_sockflush(&session->cmd);
|
ftpc_sockflush(&session->cmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TELNET_DO:
|
case TELNET_DO:
|
||||||
case TELNET_DONT:
|
case TELNET_DONT:
|
||||||
ch = ftpc_sockgetc(&session->cmd);
|
ch = ftpc_sockgetc(&session->cmd);
|
||||||
ftpc_sockprintf(&session->cmd, "%c%c%c", TELNET_IAC, TELNET_WONT, ch);
|
ftpc_sockprintf(&session->cmd, "%c%c%c",
|
||||||
|
TELNET_IAC, TELNET_WONT, ch);
|
||||||
ftpc_sockflush(&session->cmd);
|
ftpc_sockflush(&session->cmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -134,7 +136,7 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
|||||||
|
|
||||||
/* Deal with carriage returns */
|
/* Deal with carriage returns */
|
||||||
|
|
||||||
else if (ch == ISO_cr)
|
else if (ch == ISO_CR)
|
||||||
{
|
{
|
||||||
/* What follows the carriage return? */
|
/* What follows the carriage return? */
|
||||||
|
|
||||||
@ -143,12 +145,12 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
|||||||
{
|
{
|
||||||
/* If it is followed by a NUL then keep it */
|
/* If it is followed by a NUL then keep it */
|
||||||
|
|
||||||
ch = ISO_cr;
|
ch = ISO_CR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If it is followed by a newline then break out of the loop. */
|
/* If it is followed by a newline then break out of the loop. */
|
||||||
|
|
||||||
else if (ch == ISO_nl)
|
else if (ch == ISO_NL)
|
||||||
{
|
{
|
||||||
/* Newline terminates the reply */
|
/* Newline terminates the reply */
|
||||||
|
|
||||||
@ -168,7 +170,7 @@ static int ftpc_gets(struct ftpc_session_s *session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ch == ISO_nl)
|
else if (ch == ISO_NL)
|
||||||
{
|
{
|
||||||
/* The ISO newline character terminates the string. Just break
|
/* The ISO newline character terminates the string. Just break
|
||||||
* out of the loop.
|
* out of the loop.
|
||||||
|
@ -59,10 +59,11 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* MISC definitions *********************************************************/
|
/* MISC definitions *********************************************************/
|
||||||
|
|
||||||
#define ISO_nl 0x0a
|
#define ISO_NL 0x0a
|
||||||
#define ISO_cr 0x0d
|
#define ISO_CR 0x0d
|
||||||
|
|
||||||
/* Telnet-related definitions */
|
/* Telnet-related definitions */
|
||||||
|
|
||||||
@ -223,8 +224,9 @@ extern "C"
|
|||||||
vfprintf((s)->outstream,f,ap)
|
vfprintf((s)->outstream,f,ap)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Low-level string management */
|
/* Low-level string management */
|
||||||
|
|
||||||
EXTERN void ftpc_stripcrlf(FAR char *str);
|
EXTERN void ftpc_stripcrlf(FAR char *str);
|
||||||
@ -264,7 +266,8 @@ EXTERN void ftpc_sockcopy(FAR struct ftpc_socket_s *dest,
|
|||||||
|
|
||||||
/* Socket I/O helpers */
|
/* Socket I/O helpers */
|
||||||
|
|
||||||
EXTERN int ftpc_sockprintf(FAR struct ftpc_socket_s *sock, const char *fmt, ...);
|
EXTERN int ftpc_sockprintf(FAR struct ftpc_socket_s *sock,
|
||||||
|
const char *fmt, ...);
|
||||||
EXTERN void ftpc_timeout(int argc, wdparm_t arg1, ...);
|
EXTERN void ftpc_timeout(int argc, wdparm_t arg1, ...);
|
||||||
|
|
||||||
/* Transfer helpers */
|
/* Transfer helpers */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user