diff options
author | Matti Lehtimäki <matti.lehtimaki@gmail.com> | 2012-09-29 00:24:14 +0300 |
---|---|---|
committer | Matti Lehtimäki <matti.lehtimaki@gmail.com> | 2012-09-29 00:24:14 +0300 |
commit | 64f7d4a3cd0f5a70da395ce0e79b44df52e86749 (patch) | |
tree | fadadcf775d6336f9c6104ab6766cf2e676ec56a /blacklist.c | |
parent | 792857f38c02ad2f8c7be52803f00f03304d564e (diff) | |
download | vdr-plugin-epgfixer-64f7d4a3cd0f5a70da395ce0e79b44df52e86749.tar.gz vdr-plugin-epgfixer-64f7d4a3cd0f5a70da395ce0e79b44df52e86749.tar.bz2 |
Remove duplicate code. Harmonise code formatting.
Diffstat (limited to 'blacklist.c')
-rw-r--r-- | blacklist.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/blacklist.c b/blacklist.c index 4bacf2c..786ef87 100644 --- a/blacklist.c +++ b/blacklist.c @@ -21,16 +21,9 @@ bool cBlacklist::Apply(cChannel *Channel) void cBlacklist::SetFromString(char *s, bool Enabled) { Free(); - enabled = Enabled; - if (s[0] == '!') - string = strdup(s+1); - else - string = strdup(s); - if (s[0] == '!' || s[0] == '#') - enabled = false; - char *p = (s[0] == '#') ? NULL : s; - if (p) { - char *p = (s[0] == '!') ? s+1 : s; + cListItem::SetFromString(s, Enabled); + if (enabled) { + char *p = (s[0] == '!') ? s + 1 : s; numchannels = LoadChannelsFromString(p); } } |