summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2011-06-29 14:44:58 +0200
committerJochen Dolze <vdr@dolze.de>2011-06-29 14:44:58 +0200
commitf9949593c25ae2d7e71f01f7a9ca80dccd2ef096 (patch)
tree6fa756cc83de60f37fa59a6660dc16ce73c692a3
parent297eee7486703821418408a80a562301b3a3c06f (diff)
downloadvdr-plugin-xmltv2vdr-f9949593c25ae2d7e71f01f7a9ca80dccd2ef096.tar.gz
vdr-plugin-xmltv2vdr-f9949593c25ae2d7e71f01f7a9ca80dccd2ef096.tar.bz2
Changed a few things according to cppcheck
-rw-r--r--extpipe.h2
-rw-r--r--maps.cpp1
-rw-r--r--parse.cpp8
-rw-r--r--parse.h6
4 files changed, 9 insertions, 8 deletions
diff --git a/extpipe.h b/extpipe.h
index 09f9948..8df5356 100644
--- a/extpipe.h
+++ b/extpipe.h
@@ -12,7 +12,7 @@ private:
public:
cExtPipe(void);
~cExtPipe();
- operator FILE* ()
+ operator FILE* () const
{
return f;
}
diff --git a/maps.cpp b/maps.cpp
index 884a23f..8963af5 100644
--- a/maps.cpp
+++ b/maps.cpp
@@ -74,6 +74,7 @@ cEPGMapping::~cEPGMapping()
cEPGMapping::cEPGMapping(cEPGMapping&copy)
{
+ if (channelname) free((void *) channelname);
channelname=strdup(copy.channelname);
channelids=NULL;
numchannelids=0;
diff --git a/parse.cpp b/parse.cpp
index 31bb41e..0bb0813 100644
--- a/parse.cpp
+++ b/parse.cpp
@@ -894,6 +894,9 @@ bool cParse::Process(char *buffer, int bufsize)
if (lerr!=PARSE_XMLTVERR)
esyslog("xmltv2vdr: '%s' no starttime - error in xmltv file?",name);
lerr=PARSE_XMLTVERR;
+ xmlFree(channelid);
+ node=node->next;
+ continue;
}
if ((starttime<begin) || (starttime>end))
@@ -911,6 +914,7 @@ bool cParse::Process(char *buffer, int bufsize)
dsyslog("xmltv2vdr: '%s' till %s",name,ctime(&end));
}
oldmap=map;
+ xmlFree(channelid);
xmlChar *vpsstart=xmlGetProp(node,(const xmlChar *) "vps-start");
if (vpsstart)
@@ -924,7 +928,6 @@ bool cParse::Process(char *buffer, int bufsize)
if (stoptime) xevent.SetDuration(stoptime-starttime);
if (!FetchEvent(node)) // sets xevent
{
- xmlFree(channelid);
node=node->next;
continue;
}
@@ -935,7 +938,6 @@ bool cParse::Process(char *buffer, int bufsize)
if (lerr!=PARSE_NOSCHEDULES)
esyslog("xmltv2vdr: '%s' cannot get schedules",name);
lerr=PARSE_NOSCHEDULES;
- xmlFree(channelid);
node=node->next;
continue;
}
@@ -996,8 +998,6 @@ bool cParse::Process(char *buffer, int bufsize)
}
}
delete schedulesLock;
-
- xmlFree(channelid);
node=node->next;
}
xmlFreeDoc(xmltv);
diff --git a/parse.h b/parse.h
index 82db285..08e4500 100644
--- a/parse.h
+++ b/parse.h
@@ -79,11 +79,11 @@ public:
{
return vps;
}
- int Duration()
+ int Duration() const
{
return duration;
}
- time_t StartTime()
+ time_t StartTime() const
{
return starttime;
}
@@ -103,7 +103,7 @@ public:
{
return country;
}
- int Year()
+ int Year() const
{
return year;
}