From f8cd0ac2f7cee8ddb21b827692bc2c4a19469f33 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 17 Feb 2013 16:55:33 +0100 Subject: [PATCH] sectionsd: remove newline from SIsectionTIME message Signed-off-by: Jacek Jendrzej --- src/eitd/SIsections.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/eitd/SIsections.cpp b/src/eitd/SIsections.cpp index 04ad15596..102c560ef 100644 --- a/src/eitd/SIsections.cpp +++ b/src/eitd/SIsections.cpp @@ -174,12 +174,18 @@ void SIsectionTIME::parse(uint8_t *buf) if(tdt.getSectionLength() < 5) return; dvbtime = parseDVBtime(tdt.getUtcTimeMjd(), tdt.getUtcTimeBcd()); - xcprintf("SIsectionTIME::parse: TDT time: %s", ctime(&dvbtime)); + char *ct = ctime(&dvbtime); + /* ctime() appends a useless \n... */ + ct[strlen(ct) - 1] = 0; + /* ...and xcprintf adds another \n... */ + xcprintf("SIsectionTIME::parse: TDT time: %s", ct); parsed = true; } else { TimeOffsetSection tot(buf); dvbtime = parseDVBtime(tot.getUtcTimeMjd(), tot.getUtcTimeBcd()); - xcprintf("SIsectionTIME::parse: TOT time: %s", ctime(&dvbtime)); + char *ct = ctime(&dvbtime); + ct[strlen(ct) - 1] = 0; + xcprintf("SIsectionTIME::parse: TOT time: %s", ct); const DescriptorList &dlist = *tot.getDescriptors(); for (DescriptorConstIterator dit = dlist.begin(); dit != dlist.end(); ++dit) { uint8_t dtype = (*dit)->getTag();