[rs-commit] r53 - /redwax-tool/trunk/redwax_util.c
rs-commit at redwax.eu
rs-commit at redwax.eu
Mon Nov 22 13:47:34 CET 2021
Author: minfrin at redwax.eu
Date: Mon Nov 22 13:47:33 2021
New Revision: 53
Log:
Fix xml object in object.
Modified:
redwax-tool/trunk/redwax_util.c
Modified: redwax-tool/trunk/redwax_util.c
==============================================================================
--- redwax-tool/trunk/redwax_util.c (original)
+++ redwax-tool/trunk/redwax_util.c Mon Nov 22 13:47:33 2021
@@ -1184,29 +1184,33 @@
case REDWAX_FORMAT_TEXT:
break;
case REDWAX_FORMAT_XML: {
- if (empty) {
-
- const struct iovec vec[] = {
- {"\n", 1},
- {m->prefix, m->prefix_len},
- {"<", 1},
- {ml->k, ml->klen},
- {" />\n", 4},
- };
-
- return m->wv(m->ctx, vec, 5);
- }
- else if (array) {
-
- const struct iovec vec[] = {
- {"\n", 1},
- {m->prefix, m->prefix_len},
- {"<", 1},
- {ml->k, ml->klen},
- {">", 1},
- };
-
- return m->wv(m->ctx, vec, 5);
+
+ if (object || array ) {
+
+ if (empty) {
+
+ const struct iovec vec[] = {
+ {"\n", 1},
+ {m->prefix, m->prefix_len},
+ {"<", 1},
+ {ml->k, ml->klen},
+ {" />\n", 4},
+ };
+
+ return m->wv(m->ctx, vec, 5);
+ }
+ else {
+
+ const struct iovec vec[] = {
+ {"\n", 1},
+ {m->prefix, m->prefix_len},
+ {"<", 1},
+ {ml->k, ml->klen},
+ {">", 1},
+ };
+
+ return m->wv(m->ctx, vec, 5);
+ }
}
break;
More information about the rs-commit
mailing list