Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2009 09:19:33 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195676 - head/usr.bin/mklocale
Message-ID:  <200907140919.n6E9JXsg053241@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907140919.n6E9JXsg053241>