diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-15 14:57:48 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-15 14:57:48 +0100 |
commit | 9495aa9923fed16aeb6f49c69ccd249b9e17dba7 (patch) | |
tree | 5bf8b7683e3bf3b6e0725adf834b0d5344283ad3 /channels.c | |
parent | c8584521f794492d81d87d448f2c4dcefc636b34 (diff) | |
download | vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.gz vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.bz2 |
Using cString::sprintf() instead of asprintf()
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |