summaryrefslogtreecommitdiff
path: root/services.c
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-20 17:47:50 +0100
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-20 17:47:50 +0100
commit1ca3263b1febbef86071eaaa4e8eda0bbac578fa (patch)
tree51acae08ac515eba84e01c76261a7735665dd601 /services.c
parent57d0cbd75c591e450e4d11a45ac6a016de48b8cf (diff)
downloadvdr-plugin-epgsearch-1ca3263b1febbef86071eaaa4e8eda0bbac578fa.tar.gz
vdr-plugin-epgsearch-1ca3263b1febbef86071eaaa4e8eda0bbac578fa.tar.bz2
replaced asprintf with cString::sprintf and a wrapper function
Diffstat (limited to 'services.c')
-rw-r--r--services.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/services.c b/services.c
index f1135be..0b55651 100644
--- a/services.c
+++ b/services.c
@@ -124,7 +124,6 @@ std::list<std::string> cEpgsearchServiceHandler::TranslateResults(cSearchResults
{
const cEvent* pEvent = result->event;
cTimer* Timer = new cTimer(pEvent);
- char *cmdbuf = NULL;
static char bufStart[25];
static char bufEnd[25];
@@ -160,7 +159,7 @@ std::list<std::string> cEpgsearchServiceHandler::TranslateResults(cSearchResults
std::string description = pEvent->Description()?ReplaceAll(pEvent->Description(), "|", "!^pipe!^"):"";
description = ReplaceAll(description, ":", "|");
- asprintf(&cmdbuf, "%d:%u:%s:%s:%s:%ld:%ld:%s:%ld:%ld:%s:%d",
+ cString cmdbuf = cString::sprintf("%d:%u:%s:%s:%s:%ld:%ld:%s:%ld:%ld:%s:%d",
result->search->ID,
pEvent->EventID(),
title.c_str(),
@@ -174,8 +173,8 @@ std::list<std::string> cEpgsearchServiceHandler::TranslateResults(cSearchResults
timerMode>0?result->search->BuildFile(pEvent):"",
timerMode);
- list.push_back(cmdbuf);
- free(cmdbuf);
+ list.push_back(*cmdbuf);
+
delete(Timer);
result = pCompleteSearchResults->Next(result);
}