[riot-notifications] [RIOT-OS/RIOT] Add basic syslog implementation (#11362)

crest42 notifications at github.com
Mon May 27 11:05:26 CEST 2019


crest42 commented on this pull request.



> +#include <unistd.h>
+#include <time.h>
+#include <netdb.h>
+
+#define ENABLE_DEBUG (0)
+#include "debug.h"
+
+#include "syslog/syslog.h"
+#include "xtimer.h"
+
+static char buf[SYSLOG_BUF_NUMOF][SYSLOG_MAX_LEN];
+static syslog_msg_t _msg[SYSLOG_BUF_NUMOF];
+static char _ident[IDENT_MAX_LEN];
+static char hostname[HOST_NAME_MAX];
+static mutex_t syslog_mutex = MUTEX_INIT;
+static int _facility = 0;

Yea that is true. But it should be auto-optimized by the compiler anyway? Or is it just always good practice to drop such redundant initializations? I asking bc I find it a little bit more readable with an explicit initialization.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11362#discussion_r287707764
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190527/6604940c/attachment.html>


More information about the notifications mailing list