diff options
author | Jonas Suhr Christensen <jsc@umbraculum.org> | 2012-12-12 15:16:54 +0100 |
---|---|---|
committer | Jonas Suhr Christensen <jsc@umbraculum.org> | 2012-12-12 15:16:54 +0100 |
commit | fe903864590701f8e37c65b118bb0a907e797e56 (patch) | |
tree | 14ca0639f28c0a63625a8859ce7c405e16dc9a3a /debug_syslog.c | |
parent | db8615d88861dc31c7dbb00a3585921151de24e5 (diff) |
Fixed compiling with -Wall and -Werror.
Removed debug_filter.
Diffstat (limited to 'debug_syslog.c')
-rw-r--r-- | debug_syslog.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/debug_syslog.c b/debug_syslog.c index c5d9dbc..c3f8062 100644 --- a/debug_syslog.c +++ b/debug_syslog.c @@ -27,8 +27,6 @@ */ #include "debug_syslog.h" -#define _GNU_SOURCE - #include <stdio.h> #include <string.h> #include <time.h> @@ -74,7 +72,8 @@ void dbg_syslog_init(const char* host, int port) char buf[SYSLOG_LENOFEXECNAME]; FILE* f = fopen("/proc/self/cmdline", "r"); if(f) { - fgets(buf, SYSLOG_LENOFEXECNAME, f); + char* s = NULL; + s = fgets(buf, SYSLOG_LENOFEXECNAME, f); fclose(f); } @@ -175,10 +174,6 @@ void dbg_syslog_createheader() { * * */ -static void _calculate_pri() { - -} - void dbg_syslog_output(char* msg) { if(dbg_syslog_sock < 0) return; @@ -190,7 +185,8 @@ void dbg_syslog_output(char* msg) strftime(buftime, SYSLOG_TIMELEN, "%b %e %H:%M:%S ", &time); // Currently everything is mapped to local facility 4 as debug - char bufpri[SYSLOG_PRILEN] = "<167>"; + char bufpri[SYSLOG_PRILEN]; + strncpy(bufpri, "<167>", SYSLOG_PRILEN); char buftag[SYSLOG_TAGLEN]; snprintf(buftag, SYSLOG_TAGLEN, "%s[%d]: ", execname, pid); |