You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/01 17:44:26 UTC

[incubator-nuttx] branch master updated: syslog: fix bug about syslog_default_write

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4ae6862  syslog: fix bug about syslog_default_write
4ae6862 is described below

commit 4ae6862bbe79dc24bbd35827c41187469a842063
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Thu May 20 15:10:29 2021 +0800

    syslog: fix bug about syslog_default_write
    
    Change-Id: I6d8b5bce8071f11b1903fe1fa0fe8dbc34bf3a09
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 drivers/syslog/syslog_write.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/syslog/syslog_write.c b/drivers/syslog/syslog_write.c
index e2d2067..005823f 100644
--- a/drivers/syslog/syslog_write.c
+++ b/drivers/syslog/syslog_write.c
@@ -66,7 +66,7 @@ static ssize_t syslog_default_write(FAR const char *buffer, size_t buflen)
 #ifdef CONFIG_SYSLOG_INTBUFFER
           if (up_interrupt_context())
             {
-              syslog_add_intbuffer(*buffer++);
+              syslog_add_intbuffer(buffer[nwritten]);
             }
           else
 #endif
@@ -80,7 +80,7 @@ static ssize_t syslog_default_write(FAR const char *buffer, size_t buflen)
 
                   DEBUGASSERT(g_syslog_channel[i]->sc_ops->sc_force != NULL);
                   g_syslog_channel[i]->sc_ops->sc_force(g_syslog_channel[i],
-                                                        *buffer++);
+                                                        buffer[nwritten]);
                 }
             }
         }
@@ -107,7 +107,7 @@ static ssize_t syslog_default_write(FAR const char *buffer, size_t buflen)
               for (nwritten = 0; nwritten < buflen; nwritten++)
                 {
                   g_syslog_channel[i]->sc_ops->sc_putc(g_syslog_channel[i],
-                                                       *buffer++);
+                                                       buffer[nwritten]);
                 }
             }
         }