Permalink
Browse files

Fixed yet more Coverity issues (#163)

  • Loading branch information...
relipo committed Nov 30, 2016
1 parent 3dc5550 commit 4bc6f1e188e23ce05ee8e1a373d5d995861f32a8
Showing with 10 additions and 7 deletions.
  1. +9 −6 src/vbox/VBox.cpp
  2. +1 −1 src/vbox/response/Content.cpp
View
@@ -616,15 +616,18 @@ bool VBox::DeleteRecordingOrTimer(unsigned int id)
{
return id == series->m_id;
});
if (seriesItr == m_series.cend())
if (seriesItr != m_series.end())
{
// create and send cancel request for that series recording
request::ApiRequest request = CreateDeleteSeriesRequest(*seriesItr);
PerformRequest(request);
// remove series object from memory
m_series.erase(seriesItr);
}
else
{
throw vbox::RequestFailedException("Could not find timer's ID in backend");
}
// create and send cancel request for that series recording
request::ApiRequest request = CreateDeleteSeriesRequest(*seriesItr);
PerformRequest(request);
// remove series object from memory
m_series.erase(seriesItr);
}
// Fire events
@@ -228,7 +228,7 @@ static void AddWeekdayBits(unsigned int &rWeekdays, const char *pWeekdaysText)
char *pDay;
char buf[32];
strncpy(buf, pWeekdaysText, sizeof(buf));
strncpy(buf, pWeekdaysText, sizeof(buf)-1);
pDay = strtok(buf, ",");
while (pDay)

0 comments on commit 4bc6f1e

Please sign in to comment.