mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gdatainputstream: replace easy use of g_memdup()
This code is passing a gsize, so might as well switch this to g_memdup2(). This is the only use of g_memdup() in GLib 2.56 that is not part of GLib 2.58. All other uses analyzed in glib!2000.
This commit is contained in:
parent
5d1d065ac3
commit
d9e9ba70a0
@ -27,6 +27,7 @@
|
|||||||
#include "gioenumtypes.h"
|
#include "gioenumtypes.h"
|
||||||
#include "gioerror.h"
|
#include "gioerror.h"
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
|
#include "gstrfuncsprivate.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -1082,7 +1083,7 @@ g_data_input_stream_read_async (GDataInputStream *stream,
|
|||||||
data = g_slice_new0 (GDataInputStreamReadData);
|
data = g_slice_new0 (GDataInputStreamReadData);
|
||||||
if (stop_chars_len == -1)
|
if (stop_chars_len == -1)
|
||||||
stop_chars_len = strlen (stop_chars);
|
stop_chars_len = strlen (stop_chars);
|
||||||
data->stop_chars = g_memdup (stop_chars, stop_chars_len);
|
data->stop_chars = g_memdup2 (stop_chars, stop_chars_len);
|
||||||
data->stop_chars_len = stop_chars_len;
|
data->stop_chars_len = stop_chars_len;
|
||||||
data->last_saw_cr = FALSE;
|
data->last_saw_cr = FALSE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user