summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-02-15 14:57:48 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-02-15 14:57:48 +0100
commit9495aa9923fed16aeb6f49c69ccd249b9e17dba7 (patch)
tree5bf8b7683e3bf3b6e0725adf834b0d5344283ad3 /timers.c
parentc8584521f794492d81d87d448f2c4dcefc636b34 (diff)
downloadvdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.gz
vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.bz2
Using cString::sprintf() instead of asprintf()
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/timers.c b/timers.c
index 3994641d..a0e0da0e 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.70 2008/02/10 14:05:49 kls Exp $
+ * $Id: timers.c 1.71 2008/02/10 16:26:25 kls Exp $
*/
#include "timers.h"
@@ -135,18 +135,15 @@ int cTimer::Compare(const cListObject &ListObject) const
cString cTimer::ToText(bool UseChannelID)
{
- char *buffer;
strreplace(file, ':', '|');
- asprintf(&buffer, "%u:%s:%s:%04d:%04d:%d:%d:%s:%s\n", flags, UseChannelID ? *Channel()->GetChannelID().ToString() : *itoa(Channel()->Number()), *PrintDay(day, weekdays, true), start, stop, priority, lifetime, file, aux ? aux : "");
+ cString buffer = cString::sprintf("%u:%s:%s:%04d:%04d:%d:%d:%s:%s\n", flags, UseChannelID ? *Channel()->GetChannelID().ToString() : *itoa(Channel()->Number()), *PrintDay(day, weekdays, true), start, stop, priority, lifetime, file, aux ? aux : "");
strreplace(file, '|', ':');
- return cString(buffer, true);
+ return buffer;
}
cString cTimer::ToDescr(void) const
{
- char *buffer;
- asprintf(&buffer, "%d (%d %04d-%04d %s'%s')", Index() + 1, Channel()->Number(), start, stop, HasFlags(tfVps) ? "VPS " : "", file);
- return cString(buffer, true);
+ return cString::sprintf("%d (%d %04d-%04d %s'%s')", Index() + 1, Channel()->Number(), start, stop, HasFlags(tfVps) ? "VPS " : "", file);
}
int cTimer::TimeToInt(int t)