examples: ftpc: Fix style violations in ftpc_main.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
9a90b65355
commit
ba3baa57a5
@ -67,7 +67,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
struct cmdmap_s
|
struct cmdmap_s
|
||||||
@ -138,6 +138,7 @@ static int cmd_lhelp(SESSION handle, int argc, char **argv)
|
|||||||
printf(" %s\n", ptr->cmd);
|
printf(" %s\n", ptr->cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +201,9 @@ char *ftpc_argument(char **saveptr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* No, then any of the usual terminators will terminate the argument */
|
/* No, then any of the usual terminators
|
||||||
|
* will terminate the argument
|
||||||
|
*/
|
||||||
|
|
||||||
term = g_delim;
|
term = g_delim;
|
||||||
}
|
}
|
||||||
@ -225,7 +228,6 @@ char *ftpc_argument(char **saveptr)
|
|||||||
/* Save the pointer where we left off */
|
/* Save the pointer where we left off */
|
||||||
|
|
||||||
*saveptr = pend;
|
*saveptr = pend;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the beginning of the token. */
|
/* Return the beginning of the token. */
|
||||||
@ -296,6 +298,7 @@ static int ftpc_execute(SESSION handle, int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
printf("%s failed: %d\n", cmd, errno);
|
printf("%s failed: %d\n", cmd, errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,7 +308,7 @@ static int ftpc_execute(SESSION handle, int argc, char *argv[])
|
|||||||
|
|
||||||
int ftpc_parse(SESSION handle, char *cmdline)
|
int ftpc_parse(SESSION handle, char *cmdline)
|
||||||
{
|
{
|
||||||
FAR char *argv[FTPC_MAX_ARGUMENTS+1];
|
FAR char *argv[FTPC_MAX_ARGUMENTS + 1];
|
||||||
FAR char *saveptr;
|
FAR char *saveptr;
|
||||||
FAR char *cmd;
|
FAR char *cmd;
|
||||||
int argc;
|
int argc;
|
||||||
@ -342,6 +345,7 @@ int ftpc_parse(SESSION handle, char *cmdline)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
argv[argc] = NULL;
|
argv[argc] = NULL;
|
||||||
|
|
||||||
/* Check if the maximum number of arguments was exceeded */
|
/* Check if the maximum number of arguments was exceeded */
|
||||||
@ -384,7 +388,8 @@ int main(int argc, FAR char *argv[])
|
|||||||
printf("Usage:\n");
|
printf("Usage:\n");
|
||||||
printf(" %s xx:xx:xx:xx:xx:xx:xx:xx [pp]\n", argv[0]);
|
printf(" %s xx:xx:xx:xx:xx:xx:xx:xx [pp]\n", argv[0]);
|
||||||
printf("Where\n");
|
printf("Where\n");
|
||||||
printf(" xx:xx:xx:xx:xx:xx:xx:xx is the IP address of the FTP server\n");
|
printf(" xx:xx:xx:xx:xx:xx:xx:xx is "
|
||||||
|
"the IP address of the FTP server\n");
|
||||||
printf(" pp is option port to use with the FTP server\n");
|
printf(" pp is option port to use with the FTP server\n");
|
||||||
#else
|
#else
|
||||||
printf("Usage:\n");
|
printf("Usage:\n");
|
||||||
@ -418,7 +423,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
server.in4.sin_port = atoi(ptr+1);
|
server.in4.sin_port = atoi(ptr + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
server.in4.sin_family = AF_INET;
|
server.in4.sin_family = AF_INET;
|
||||||
@ -453,7 +458,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
/* Then enter the command line parsing loop */
|
/* Then enter the command line parsing loop */
|
||||||
|
|
||||||
for (;;)
|
for (; ; )
|
||||||
{
|
{
|
||||||
/* Display the prompt string */
|
/* Display the prompt string */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user