Takuro Ashie
makei****@users*****
2006年 11月 26日 (日) 10:26:11 JST
Index: tomoe/lib/tomoe-dict.c diff -u tomoe/lib/tomoe-dict.c:1.78 tomoe/lib/tomoe-dict.c:1.79 --- tomoe/lib/tomoe-dict.c:1.78 Sun Nov 26 10:20:30 2006 +++ tomoe/lib/tomoe-dict.c Sun Nov 26 10:26:10 2006 @@ -21,7 +21,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: tomoe-dict.c,v 1.78 2006/11/26 01:20:30 makeinu Exp $ + * $Id: tomoe-dict.c,v 1.79 2006/11/26 01:26:10 makeinu Exp $ */ #include <stdio.h> @@ -869,20 +869,17 @@ "<!DOCTYPE tomoe_dictionary SYSTEM \"tomoe-dict.dtd\">" "<tomoe_dictionary name=\"%s\">\n", priv->name); - count = fwrite (buf, strlen (buf), 1, f); - if (count < 1) goto ERROR; + if (fwrite (buf, strlen (buf), 1, f) < 1) goto ERROR; /* write each characters */ for (i = 0; i < priv->letters->len; i++) { TomoeChar* chr = (TomoeChar*)g_ptr_array_index (priv->letters, i); - gboolean success = _write_character (chr, f); - if (!success) goto ERROR; + if (!_write_character (chr, f)) goto ERROR; } /* close root element */ g_snprintf (buf, G_N_ELEMENTS(buf), "</tomoe_dictionary>\n"); - count = fwrite (buf, strlen (buf), 1, f); - if (count < 1) goto ERROR; + if (fwrite (buf, strlen (buf), 1, f) < 1) goto ERROR; /* clean */ fclose (f);