From 95e3bdf5fd03a18b26f72a902ca8294b5947eb65 Mon Sep 17 00:00:00 2001 From: Andreas Hofmeister Date: Sun, 28 Feb 2010 17:50:35 +0100 Subject: [PATCH] Use LLOG_WARNX in xml_writer.c and remove superfluous newlines. --- src/xml_writer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xml_writer.c b/src/xml_writer.c index 2e9d0ab4..cfcef7e9 100644 --- a/src/xml_writer.c +++ b/src/xml_writer.c @@ -33,11 +33,11 @@ void xml_start(struct writer * w , const char * tag, const char * descr ) { struct xml_writer_private * p = w->priv; if (xmlTextWriterStartElement(p->xw, BAD_CAST tag) < 0) - LLOG_WARN("cannot start '%s' element\n", tag); + LLOG_WARNX("cannot start '%s' element", tag); if ( descr && (strlen(descr) > 0) ) { if (xmlTextWriterWriteFormatAttribute(p->xw, BAD_CAST "label", "%s", descr) < 0) - LLOG_WARN("cannot add attribute 'label' to element %s\n", tag); + LLOG_WARNX("cannot add attribute 'label' to element %s", tag); } } @@ -45,21 +45,21 @@ void xml_attr(struct writer * w, const char * tag, const char * descr, const cha struct xml_writer_private * p = w->priv; if (xmlTextWriterWriteFormatAttribute(p->xw, BAD_CAST tag, "%s", value) < 0) - LLOG_WARN("cannot add attribute %s with value %s\n", tag, value); + LLOG_WARNX("cannot add attribute %s with value %s", tag, value); } void xml_data(struct writer * w, const char * data) { struct xml_writer_private * p = w->priv; if (xmlTextWriterWriteString(p->xw, BAD_CAST data) < 0 ) - LLOG_WARN("cannot add '%s' as data to element\n", data); + LLOG_WARNX("cannot add '%s' as data to element", data); } void xml_end(struct writer * w) { struct xml_writer_private * p = w->priv; if (xmlTextWriterEndElement(p->xw) < 0 ) - LLOG_WARN("cannot end element\n"); + LLOG_WARNX("cannot end element\n"); } #define MY_ENCODING "UTF-8" @@ -69,7 +69,7 @@ void xml_finish(struct writer * w) { int failed = 0; if (xmlTextWriterEndDocument(p->xw) < 0 ) { - LLOG_WARN("cannot finish document\n"); + LLOG_WARNX("cannot finish document"); failed = 1; } -- 2.39.5