diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-07-14 09:19:33 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-07-14 09:19:33 +0000 |
commit | 523a386d233fdba474e22adcc2b981dae6f3923a (patch) | |
tree | 6194ada65ae4540ce8451f20116b7216109fe600 /usr.bin/mklocale/yacc.y | |
parent | 3d22427cff0849b71e496010c8433961a6e2551c (diff) | |
download | src-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.y | 4 |
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); } |