aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/writer.c b/src/writer.c
index f4edf731..9881f00f 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -697,9 +697,11 @@ serd_writer_write_statement(SerdWriter* writer,
}
#define TRY(write_result) \
- if (!(write_result)) { \
- return SERD_ERR_UNKNOWN; \
- }
+ do { \
+ if (!(write_result)) { \
+ return SERD_ERR_UNKNOWN; \
+ } \
+ } while (0)
switch (writer->syntax) {
case SERD_NTRIPLES: