diff options
author | Jochen Dolze <vdr@dolze.de> | 2011-06-29 14:44:58 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2011-06-29 14:44:58 +0200 |
commit | f9949593c25ae2d7e71f01f7a9ca80dccd2ef096 (patch) | |
tree | 6fa756cc83de60f37fa59a6660dc16ce73c692a3 | |
parent | 297eee7486703821418408a80a562301b3a3c06f (diff) | |
download | vdr-plugin-xmltv2vdr-f9949593c25ae2d7e71f01f7a9ca80dccd2ef096.tar.gz vdr-plugin-xmltv2vdr-f9949593c25ae2d7e71f01f7a9ca80dccd2ef096.tar.bz2 |
Changed a few things according to cppcheck
-rw-r--r-- | extpipe.h | 2 | ||||
-rw-r--r-- | maps.cpp | 1 | ||||
-rw-r--r-- | parse.cpp | 8 | ||||
-rw-r--r-- | parse.h | 6 |
4 files changed, 9 insertions, 8 deletions
@@ -12,7 +12,7 @@ private: public: cExtPipe(void); ~cExtPipe(); - operator FILE* () + operator FILE* () const { return f; } @@ -74,6 +74,7 @@ cEPGMapping::~cEPGMapping() cEPGMapping::cEPGMapping(cEPGMapping©) { + if (channelname) free((void *) channelname); channelname=strdup(copy.channelname); channelids=NULL; numchannelids=0; @@ -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); @@ -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; } |