From 03ec14e0f58e6801803e61dec45375101364e743 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Wed, 10 Apr 2013 11:31:21 +0100 Subject: [PATCH] tvhlog: ignore empty subsys values --- src/tvhlog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tvhlog.c b/src/tvhlog.c index e0466e94..6e0a2332 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -74,6 +74,7 @@ void tvhlog_set_subsys ( const char *subsys ) while ( t ) { subsys = NULL; a = 1; + if (!*t) goto next; if (t[0] == '+' || t[0] == '-') { a = t[0] == '+'; t++; @@ -86,6 +87,7 @@ void tvhlog_set_subsys ( const char *subsys ) if (!tvhlog_subsys) tvhlog_subsys = htsmsg_create_map(); htsmsg_set_u32(tvhlog_subsys, t, a); +next: t = strtok_r(NULL, ",", &r); } free(s);