]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Use LLOG_WARNX in xml_writer.c and remove superfluous newlines.
authorAndreas Hofmeister <andi@collax.com>
Sun, 28 Feb 2010 16:50:35 +0000 (17:50 +0100)
committerVincent <bernat@luffy.cx>
Sat, 6 Mar 2010 09:26:46 +0000 (10:26 +0100)
src/xml_writer.c

index 2e9d0ab4fefde76ae0c0b9a5170923d88de687e8..cfcef7e94788a13afebfb0b9df453bfe7455783e 100644 (file)
@@ -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;
        }