This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 12a98433b7e42386c4b5a770725dccc976ac1b73
Author: YAMAMOTO Takashi <yamam...@midokura.com>
AuthorDate: Tue Dec 1 14:08:41 2020 +0900

    netutils/chat/chat.c: Appease nxstyle
    
    The following nxstyle error is intentionally left.
    It's a nested function. I guess nxstyle doesn't support it.
    
    netutils/chat/chat.c:110:8: error: Bad comment alignment
---
 netutils/chat/chat.c | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/netutils/chat/chat.c b/netutils/chat/chat.c
index a4c6c88..2e883ed 100644
--- a/netutils/chat/chat.c
+++ b/netutils/chat/chat.c
@@ -66,9 +66,9 @@
 
 struct chat_token
 {
-  FAR char* string;
+  FAR char *string;
   bool no_termin;
-  FAR struct chat_token* next;
+  FAR struct chat_token *next;
 };
 
 /****************************************************************************
@@ -245,6 +245,7 @@ static int chat_tokenise(FAR struct chat *priv,
                   break;
 
                 case 'c':
+
                   /* Deassert line terminator */
 
                   no_termin = true;
@@ -342,7 +343,8 @@ static int chat_internalise(FAR struct chat *priv,
             {
               /* Copy the token and add the line terminator as appropriate */
 
-              sprintf(line->rhs, tok->no_termin ? "%s" : "%s\r\n", 
tok->string);
+              sprintf(line->rhs, tok->no_termin ? "%s" : "%s\r\n",
+                      tok->string);
             }
           else
             {
@@ -414,7 +416,7 @@ static int chat_internalise(FAR struct chat *priv,
 
 static void chat_tokens_free(FAR struct chat_token *first_tok)
 {
-  FAR struct chat_token* next_tok;
+  FAR struct chat_token *next_tok;
 
   while (first_tok)
     {
@@ -437,10 +439,10 @@ static int chat_script_parse(FAR struct chat *priv, FAR 
const char *script)
   int ret;
 
   ret = chat_tokenise(priv, script, &first_tok);
-   if (!ret)
-     {
-       ret = chat_internalise(priv, first_tok);
-     }
+  if (!ret)
+    {
+      ret = chat_internalise(priv, first_tok);
+    }
 
   chat_tokens_free(first_tok);
   return ret;
@@ -504,7 +506,7 @@ static int chat_expect(FAR struct chat *priv, FAR const 
char *s)
 
   /* Get initial time and set the end time */
 
-  clock_gettime(CLOCK_REALTIME, (FAR struct timespec*) &abstime);
+  clock_gettime(CLOCK_REALTIME, (FAR struct timespec *)&abstime);
   endtime.tv_sec  = abstime.tv_sec + priv->ctl.timeout;
   endtime.tv_nsec = abstime.tv_nsec;
 
@@ -537,7 +539,7 @@ static int chat_expect(FAR struct chat *priv, FAR const 
char *s)
 
           /* Update current time */
 
-          clock_gettime(CLOCK_REALTIME, (FAR struct timespec*) &abstime);
+          clock_gettime(CLOCK_REALTIME, (FAR struct timespec *)&abstime);
         }
     }
 
@@ -564,8 +566,8 @@ static int chat_send(FAR struct chat *priv, FAR const char 
*s)
   return ret;
 }
 
-static int chat_line_run(FAR struct chat* priv,
-                         FAR const struct chat_line* line)
+static int chat_line_run(FAR struct chat *priv,
+                         FAR const struct chat_line *line)
 {
   int ret = 0;
   int numarg;
@@ -584,7 +586,9 @@ static int chat_line_run(FAR struct chat* priv,
       switch (line->lhs.command)
         {
         case CHAT_COMMAND_ABORT:
+
           /* TODO */
+
           break;
 
         case CHAT_COMMAND_ECHO:
@@ -684,8 +688,8 @@ static int chat_script_run(FAR struct chat *priv)
 
 static int chat_script_free(FAR struct chat *priv)
 {
-  FAR struct chat_line* line = priv->script;
-  FAR struct chat_line* next_line;
+  FAR struct chat_line *line = priv->script;
+  FAR struct chat_line *next_line;
   int ret = 0;
 
   while (line)

Reply via email to