summaryrefslogtreecommitdiff
path: root/channels.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 /channels.c
parentc8584521f794492d81d87d448f2c4dcefc636b34 (diff)
downloadvdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.gz
vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.bz2
Using cString::sprintf() instead of asprintf()
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels.c b/channels.c
index 4fef3e1f..9730a436 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 1.58 2008/02/10 14:11:47 kls Exp $
+ * $Id: channels.c 1.59 2008/02/10 15:45:38 kls Exp $
*/
#include "channels.h"
@@ -658,12 +658,12 @@ cString cChannel::ToText(const cChannel *Channel)
q += sprintf(q, ";%s", Channel->provider);
*q = 0;
strreplace(FullName, ':', '|');
- char *buffer;
+ cString buffer;
if (Channel->groupSep) {
if (Channel->number)
- asprintf(&buffer, ":@%d %s\n", Channel->number, FullName);
+ buffer = cString::sprintf(":@%d %s\n", Channel->number, FullName);
else
- asprintf(&buffer, ":%s\n", FullName);
+ buffer = cString::sprintf(":%s\n", FullName);
}
else {
char vpidbuf[32];
@@ -685,9 +685,9 @@ cString cChannel::ToText(const cChannel *Channel)
q = caidbuf;
q += IntArrayToString(q, Channel->caids, 16);
*q = 0;
- asprintf(&buffer, "%s:%d:%s:%s:%d:%s:%s:%d:%s:%d:%d:%d:%d\n", FullName, Channel->frequency, *Channel->ParametersToString(), *cSource::ToString(Channel->source), Channel->srate, vpidbuf, apidbuf, Channel->tpid, caidbuf, Channel->sid, Channel->nid, Channel->tid, Channel->rid);
+ buffer = cString::sprintf("%s:%d:%s:%s:%d:%s:%s:%d:%s:%d:%d:%d:%d\n", FullName, Channel->frequency, *Channel->ParametersToString(), *cSource::ToString(Channel->source), Channel->srate, vpidbuf, apidbuf, Channel->tpid, caidbuf, Channel->sid, Channel->nid, Channel->tid, Channel->rid);
}
- return cString(buffer, true);
+ return buffer;
}
cString cChannel::ToText(void) const