mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
Change to g_warning() into assertions in GOutputStream
These would only happen if the API contract of the write() and writev() functions was broken by subclasses.
This commit is contained in:
parent
0bcc177378
commit
89da9eb6c0
@ -306,9 +306,7 @@ g_output_stream_write_all (GOutputStream *stream,
|
||||
*bytes_written = _bytes_written;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (res == 0)
|
||||
g_warning ("Write returned zero without error");
|
||||
g_return_val_if_fail (res > 0, FALSE);
|
||||
|
||||
_bytes_written += res;
|
||||
}
|
||||
@ -492,8 +490,7 @@ g_output_stream_writev_all (GOutputStream *stream,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (n_written == 0)
|
||||
g_warning ("Write returned zero without error");
|
||||
g_return_val_if_fail (n_written > 0, FALSE);
|
||||
_bytes_written += n_written;
|
||||
|
||||
/* skip vectors that have been written in full */
|
||||
|
Loading…
Reference in New Issue
Block a user