GMemoryOutputStream: Don't return -1 as a gboolean in precondition

Since it could confuse callers (admittedly who are already violating
a precondition).

Just spotted while adapting some bits of this code for a ssh library.
This commit is contained in:
Colin Walters 2013-10-08 12:17:16 -04:00
parent 30772e74bf
commit e2d5282636

View File

@ -678,7 +678,7 @@ g_memory_output_stream_close_finish (GOutputStream *stream,
GAsyncResult *result,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (result, stream), -1);
g_return_val_if_fail (g_task_is_valid (result, stream), FALSE);
return g_task_propagate_boolean (G_TASK (result), error);
}