summaryrefslogtreecommitdiffstats
path: root/usr.bin/mklocale
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-07-14 09:19:33 +0000
committered <ed@FreeBSD.org>2009-07-14 09:19:33 +0000
commit5337594c188da320fcce40bc3de8358fe7c75b43 (patch)
tree6194ada65ae4540ce8451f20116b7216109fe600 /usr.bin/mklocale
parent27723bd87ef04e5c29ed699eb8dbf9c8c8c81de5 (diff)
downloadFreeBSD-src-5337594c188da320fcce40bc3de8358fe7c75b43.zip
FreeBSD-src-5337594c188da320fcce40bc3de8358fe7c75b43.tar.gz
Make mklocale work again, now that fwrite()'s return codes are different.
Submitted by: Navdeep Parhar <nparhar gmail com> Approved by: re (kib)
Diffstat (limited to 'usr.bin/mklocale')
-rw-r--r--usr.bin/mklocale/yacc.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y
index 4024f67..344af22 100644
--- a/usr.bin/mklocale/yacc.y
+++ b/usr.bin/mklocale/yacc.y
@@ -730,8 +730,8 @@ dump_tables()
/*
* PART 6: And finally the variable data
*/
- if (fwrite(variable,
- ntohl(new_locale.variable_len), 1, fp) != 1) {
+ if (new_locale.variable_len != 0 &&
+ fwrite(variable, ntohl(new_locale.variable_len), 1, fp) != 1) {
perror(locale_file);
exit(1);
}
OpenPOWER on IntegriCloud