projects
/
gnome.gobject-introspection
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe7cf33
)
Handle the return value to fwrite properly
author
Johan Dahlin
<jdahlin@litl.com>
Sat, 21 Feb 2009 02:58:22 +0000
(23:58 -0300)
committer
Johan Dahlin
<johan@gnome.org>
Sat, 21 Feb 2009 03:05:49 +0000
(
00:05
-0300)
tools/compiler.c
patch
|
blob
|
history
diff --git
a/tools/compiler.c
b/tools/compiler.c
index
d4de9cd
..
6c6bae6
100644
(file)
--- a/
tools/compiler.c
+++ b/
tools/compiler.c
@@
-96,6
+96,7
@@
write_out_typelib (gchar *prefix,
GTypelib *typelib)
{
FILE *file;
+ gsize written;
if (output == NULL)
{
@@
-127,7
+128,14
@@
write_out_typelib (gchar *prefix,
}
if (!code)
- fwrite (typelib->data, 1, typelib->len, file);
+ {
+ written = fwrite (typelib->data, 1, typelib->len, file);
+ if (written < typelib->len) {
+ g_error ("ERROR: Could not write the whole output: %s",
+ strerror(errno));
+ return;
+ }
+ }
else
{
gchar *code;