svn commit: r195676 - head/usr.bin/mklocale

Ed Schouten ed at FreeBSD.org
Tue Jul 14 09:19:34 UTC 2009


Author: ed
Date: Tue Jul 14 09:19:33 2009
New Revision: 195676
URL: http://svn.freebsd.org/changeset/base/195676

Log:
  Make mklocale work again, now that fwrite()'s return codes are different.
  
  Submitted by:	Navdeep Parhar <nparhar gmail com>
  Approved by:	re (kib)

Modified:
  head/usr.bin/mklocale/yacc.y

Modified: head/usr.bin/mklocale/yacc.y
==============================================================================
--- head/usr.bin/mklocale/yacc.y	Tue Jul 14 04:35:13 2009	(r195675)
+++ head/usr.bin/mklocale/yacc.y	Tue Jul 14 09:19:33 2009	(r195676)
@@ -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);
     }


More information about the svn-src-head mailing list