From 523a386d233fdba474e22adcc2b981dae6f3923a Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 14 Jul 2009 09:19:33 +0000 Subject: [PATCH] Make mklocale work again, now that fwrite()'s return codes are different. Submitted by: Navdeep Parhar Approved by: re (kib) --- usr.bin/mklocale/yacc.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y index 4024f672022..344af220cf6 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); }