[gvfs/wip/oholy/gtask: 91/95] afp: Prevent comparsion between signed and unsigned



commit 5c1660652b3395d3ee7c2462a05f12d3638e7384
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Jun 15 13:01:07 2017 +0200

    afp: Prevent comparsion between signed and unsigned
    
    Swap gssize and gsize data types in order to prevent comparisons and
    other operations between signed and unsigned types, which might lead
    to troubles.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747412

 daemon/gvfsafpconnection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsafpconnection.c b/daemon/gvfsafpconnection.c
index 806af01..1074dde 100644
--- a/daemon/gvfsafpconnection.c
+++ b/daemon/gvfsafpconnection.c
@@ -888,7 +888,7 @@ read_all_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
   GInputStream *stream = G_INPUT_STREAM (source_object);
   GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (user_data);
 
-  gsize bytes_read;
+  gssize bytes_read;
   GError *err = NULL;
   ReadAllData *read_data;
 
@@ -1187,7 +1187,7 @@ typedef struct
   gsize count;
   int io_priority;
   GCancellable *cancellable;
-  gssize bytes_written;
+  gsize bytes_written;
 } WriteAllData;
 
 inline static void


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