summaryrefslogtreecommitdiff
path: root/tools/split-messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/split-messages.c')
-rw-r--r--tools/split-messages.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/split-messages.c b/tools/split-messages.c
index 0bce7397f..73a95e153 100644
--- a/tools/split-messages.c
+++ b/tools/split-messages.c
@@ -500,13 +500,21 @@ message_write(struct param *param, struct trnsltn_entry *tlist)
return NSERROR_PERMISSION;
}
- gzprintf(outf,
+ if (gzprintf(outf,
"# This messages file is automatically generated from %s\n"
"# at build-time. Please go and edit that instead of this.\n\n",
- param->infilename);
+ param->infilename) < 1) {
+ gzclose(outf);
+ unlink(param->outfilename);
+ return NSERROR_NOSPACE;
+ };
while (tlist != NULL) {
- gzprintf(outf, "%s:%s\n", tlist->key, tlist->value);
+ if (gzprintf(outf, "%s:%s\n", tlist->key, tlist->value) < 1) {
+ gzclose(outf);
+ unlink(param->outfilename);
+ return NSERROR_NOSPACE;
+ }
tlist = tlist->next;
}