[gvfs] Don't store write() return val in unsigned variable



commit f45b677201abb6b8471fa5bc935afda420c28c39
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Nov 19 11:53:10 2009 +0100

    Don't store write() return val in unsigned variable
    
    The conversion to unsigned means we failed to recognize errors,
    since if (ret < 0) was never hit. This is the suspected cause
    for data loss in bug 598561.

 metadata/metabuilder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/metadata/metabuilder.c b/metadata/metabuilder.c
index bffdd16..cca2443 100644
--- a/metadata/metabuilder.c
+++ b/metadata/metabuilder.c
@@ -799,7 +799,7 @@ write_metadata (GString *out,
 static gboolean
 write_all_data_and_close (int fd, char *data, gsize len)
 {
-  gsize written;
+  gssize written;
   gboolean res;
 
   res = FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]