[riot-notifications] [RIOT-OS/RIOT] Add basic syslog implementation (#11362)
notifications at github.com
Mon May 27 13:08:58 CEST 2019
makomi commented on this pull request.
> +#include <unistd.h>
+#define ENABLE_DEBUG (0)
+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;
True, the compiler does not care whether one writes the additional assignment.
I would drop it, since for me it makes the code easier to read but I am not sure if it is considered best practice and I am not aware of any related RIOT-OS guideline. One might argue that omitting the explicit initialization hides what is happening, making the code more difficult to read.
I guess, I just wanted to point it out and see what you think of it, since you explicitly initialized `_facility` but not e.g. `_ident`. But to be clear, I don't think it really matters. This was just my curiosity speaking.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications