]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tvhlog: fix some silly errors.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 10 Apr 2013 10:53:11 +0000 (11:53 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 10 Apr 2013 10:53:11 +0000 (11:53 +0100)
src/tvhlog.c
src/tvhlog.h

index 6e0a23327ef1b23573ba17cc2bca1d90bdf5f949..342bbb7633f2c4479dd4ff358f80b6fe2172dee7 100644 (file)
@@ -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) {
index 69587e0d6ad59268c7552e1626392fc4364af572..c36a3c44f4a3d8ca44ba3e213b4018c62635790c 100644 (file)
@@ -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 */