summaryrefslogtreecommitdiff
path: root/epgclone.c
diff options
context:
space:
mode:
authorMatti Lehtimäki <matti.lehtimaki@gmail.com>2012-09-29 00:24:14 +0300
committerMatti Lehtimäki <matti.lehtimaki@gmail.com>2012-09-29 00:24:14 +0300
commit64f7d4a3cd0f5a70da395ce0e79b44df52e86749 (patch)
treefadadcf775d6336f9c6104ab6766cf2e676ec56a /epgclone.c
parent792857f38c02ad2f8c7be52803f00f03304d564e (diff)
downloadvdr-plugin-epgfixer-64f7d4a3cd0f5a70da395ce0e79b44df52e86749.tar.gz
vdr-plugin-epgfixer-64f7d4a3cd0f5a70da395ce0e79b44df52e86749.tar.bz2
Remove duplicate code. Harmonise code formatting.
Diffstat (limited to 'epgclone.c')
-rw-r--r--epgclone.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/epgclone.c b/epgclone.c
index 9fcff8e..427665a 100644
--- a/epgclone.c
+++ b/epgclone.c
@@ -68,16 +68,9 @@ void cEpgClone::SetFromString(char *s, bool Enabled)
dest_num = 0;
FREE(dest_str);
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;
char *f = strchr(p, '=');
if (f) {
*f = 0;