summaryrefslogtreecommitdiff
path: root/json-glib/json-glib-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-glib/json-glib-format.c')
-rw-r--r--json-glib/json-glib-format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/json-glib/json-glib-format.c b/json-glib/json-glib-format.c
index d39b325..177e8b3 100644
--- a/json-glib/json-glib-format.c
+++ b/json-glib/json-glib-format.c
@@ -114,7 +114,8 @@ format (JsonParser *parser,
p += written;
}
- write (STDOUT_FILENO, "\n", 1);
+ if (write (STDOUT_FILENO, "\n", 1) < 0)
+ g_error ("%s: %s", g_get_prgname (), g_strerror (errno));
g_free (data);