You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/24 14:45:35 UTC
[incubator-nuttx] 02/04: syslog: Make g_default_channel as static
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch pr366
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 69854ac272561f221fa7d20520cdccb459ce163f
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Feb 24 11:10:49 2020 +0800
syslog: Make g_default_channel as static
Change-Id: I83e598bf9a6fbe397c8687260549c0d8d9d2c23c
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/syslog/syslog.h | 6 +-----
drivers/syslog/syslog_channel.c | 8 ++++----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/syslog/syslog.h b/drivers/syslog/syslog.h
index c0d5117..4b9cce9 100644
--- a/drivers/syslog/syslog.h
+++ b/drivers/syslog/syslog.h
@@ -58,15 +58,11 @@ extern "C"
#define EXTERN extern
#endif
-/* The default SYSLOG channel */
-
-struct syslog_channel_s; /* Forward reference */
-EXTERN const struct syslog_channel_s g_default_channel;
-
/* This is the current syslog channel in use. It initially points to
* g_default_channel.
*/
+struct syslog_channel_s; /* Forward reference */
EXTERN FAR const struct syslog_channel_s *g_syslog_channel;
/****************************************************************************
diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c
index ebe2990..381c02b 100644
--- a/drivers/syslog/syslog_channel.c
+++ b/drivers/syslog/syslog_channel.c
@@ -79,28 +79,28 @@ static int syslog_default_flush(void);
****************************************************************************/
#if defined(CONFIG_RAMLOG_SYSLOG)
-const struct syslog_channel_s g_default_channel =
+static const struct syslog_channel_s g_default_channel =
{
ramlog_putc,
ramlog_putc,
syslog_default_flush
};
#elif defined(CONFIG_SYSLOG_RPMSG)
-const struct syslog_channel_s g_default_channel =
+static const struct syslog_channel_s g_default_channel =
{
syslog_rpmsg_putc,
syslog_rpmsg_putc,
syslog_default_flush
};
#elif defined(HAVE_LOWPUTC)
-const struct syslog_channel_s g_default_channel =
+static const struct syslog_channel_s g_default_channel =
{
up_putc,
up_putc,
syslog_default_flush
};
#else
-const struct syslog_channel_s g_default_channel =
+static const struct syslog_channel_s g_default_channel =
{
syslog_default_putc,
syslog_default_putc,