mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gobject: Use g_memdup2() instead of g_memdup() in obvious places
Convert all the call sites which use `g_memdup()`’s length argument trivially (for example, by passing a `sizeof()`), so that they use `g_memdup2()` instead. In almost all of these cases the use of `g_memdup()` would not have caused problems, but it will soon be deprecated, so best port away from it. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2319
This commit is contained in:
@@ -903,7 +903,7 @@ main (int argc, char *argv[])
|
||||
test_path = g_strdup_printf ("/param/implement/subprocess/%d-%d-%d-%d",
|
||||
data.change_this_flag, data.change_this_type,
|
||||
data.use_this_flag, data.use_this_type);
|
||||
test_data = g_memdup (&data, sizeof (TestParamImplementData));
|
||||
test_data = g_memdup2 (&data, sizeof (TestParamImplementData));
|
||||
g_test_add_data_func_full (test_path, test_data, test_param_implement_child, g_free);
|
||||
g_free (test_path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user