You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/04 05:00:00 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6363: Added color reset when a syslog channel is added.

pkarashchenko commented on code in PR #6363:
URL: https://github.com/apache/incubator-nuttx/pull/6363#discussion_r889477026


##########
drivers/syslog/syslog_channel.c:
##########
@@ -259,13 +259,26 @@ int syslog_channel(FAR struct syslog_channel_s *channel)
   int i;
 #endif
 
+#if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
+  char * col_rst = "\e[0m";
+#endif
+
   DEBUGASSERT(channel != NULL);
 
   if (channel != NULL)
     {
       DEBUGASSERT(channel->sc_ops->sc_putc != NULL &&
                   channel->sc_ops->sc_force != NULL);
 
+#if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
+      /* Reset the terminal style before using it. */
+
+      while (*col_rst)

Review Comment:
   ```suggestion
         while (*col_rst != '\0')
   ```
   



##########
drivers/syslog/syslog_channel.c:
##########
@@ -259,13 +259,26 @@ int syslog_channel(FAR struct syslog_channel_s *channel)
   int i;
 #endif
 
+#if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
+  char * col_rst = "\e[0m";

Review Comment:
   ```suggestion
     FAR char * col_rst = "\e[0m";
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org