aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mklocale/yacc.y
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-07-14 09:19:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-07-14 09:19:33 +0000
commit523a386d233fdba474e22adcc2b981dae6f3923a (patch)
tree6194ada65ae4540ce8451f20116b7216109fe600 /usr.bin/mklocale/yacc.y
parent3d22427cff0849b71e496010c8433961a6e2551c (diff)
downloadsrc-523a386d233fdba474e22adcc2b981dae6f3923a.tar.gz
src-523a386d233fdba474e22adcc2b981dae6f3923a.zip
Make mklocale work again, now that fwrite()'s return codes are different.
Submitted by: Navdeep Parhar <nparhar gmail com> Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=195676
Diffstat (limited to 'usr.bin/mklocale/yacc.y')
-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 4024f6720227..344af220cf6b 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);
}