From: Adam Sutton Date: Wed, 10 Apr 2013 10:53:11 +0000 (+0100) Subject: tvhlog: fix some silly errors. X-Git-Tag: v3.9~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36f9bd6652ec45ff40000495024a28d6c1fda567;p=thirdparty%2Ftvheadend.git tvhlog: fix some silly errors. --- diff --git a/src/tvhlog.c b/src/tvhlog.c index 6e0a23327..342bbb763 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -60,7 +60,7 @@ tvhlog_init ( int level, int options, const char *path ) void tvhlog_set_subsys ( const char *subsys ) { uint32_t a; - char *t, *r, *s; + char *t, *r = NULL, *s; if (tvhlog_subsys) htsmsg_destroy(tvhlog_subsys); @@ -212,11 +212,12 @@ void _tvhlog_hexdump(const char *file, int line, int notify, int severity, const char *subsys, - const uint8_t *data, ssize_t len) + const uint8_t *data, ssize_t len, ...) { int i, c; char str[1024]; va_list args; + va_start(args, len); pthread_mutex_lock(&tvhlog_mutex); while (len > 0) { diff --git a/src/tvhlog.h b/src/tvhlog.h index 69587e0d6..c36a3c44f 100644 --- a/src/tvhlog.h +++ b/src/tvhlog.h @@ -44,7 +44,7 @@ void _tvhlog ( const char *file, int line, void _tvhlog_hexdump ( const char *file, int line, int notify, int severity, const char *subsys, - const uint8_t *data, ssize_t len ); + const uint8_t *data, ssize_t len, ... ); /* Options */