mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
x11: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions of GLib.
This commit is contained in:
parent
3a3e029270
commit
cf3f742ad8
@ -26,6 +26,8 @@
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkdisplay-x11.h"
|
||||
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
@ -760,7 +762,7 @@ gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
|
||||
g_free (device->last_axes);
|
||||
|
||||
if (axes && n_axes)
|
||||
device->last_axes = g_memdup (axes, sizeof (double) * n_axes);
|
||||
device->last_axes = g_memdup2 (axes, sizeof (double) * n_axes);
|
||||
else
|
||||
device->last_axes = NULL;
|
||||
}
|
||||
|
@ -4232,7 +4232,7 @@ _gdk_x11_moveresize_handle_event (const XEvent *event)
|
||||
*mv_resize->moveresize_pending_event = *event;
|
||||
else
|
||||
mv_resize->moveresize_pending_event =
|
||||
g_memdup (event, sizeof (XEvent));
|
||||
g_memdup2 (event, sizeof (XEvent));
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user