]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
treat zero-returns on stream writes as success
authorMichael Terry <michael.terry@canonical.com>
Thu, 18 Aug 2011 16:26:29 +0000 (12:26 -0400)
committerMichael Terry <michael.terry@canonical.com>
Thu, 18 Aug 2011 16:26:29 +0000 (12:26 -0400)
src/xauthority.c

index ba770c62428933a18b0d9724374672d9ad7ba31a..837ee448161e7db440e07661ce732a14615e907e 100644 (file)
@@ -206,13 +206,13 @@ write_uint16 (GOutputStream *stream, guint16 value, GError **error)
 
     data[0] = value >> 8;
     data[1] = value & 0xFF;
-    return g_output_stream_write (stream, data, 2, NULL, error);
+    return g_output_stream_write (stream, data, 2, NULL, error) >= 0;
 }
 
 static gboolean
 write_data (GOutputStream *stream, const guint8 *data, gsize data_length, GError **error)
 {
-    return g_output_stream_write (stream, data, data_length, NULL, error);
+    return g_output_stream_write (stream, data, data_length, NULL, error) >= 0;
 }
 
 static gboolean