summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-02-04 19:14:47 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2021-02-11 14:22:22 +0000
commit3a3e0292704d1bdf319b130b509efd43b7df3c7c (patch)
treed69c5b012c8b232af88f9ad88c1e837afbc2ee68
parent435d12680d432121136e0d71a8901e29ea8a42a4 (diff)
downloadgtk+-3a3e0292704d1bdf319b130b509efd43b7df3c7c.tar.gz
wayland: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions of GLib.
-rw-r--r--gdk/wayland/gdkdevice-wayland.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 8e3cef103d..947302c219 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -39,6 +39,8 @@
#include "gdkdropprivate.h"
#include "gdkprimary-wayland.h"
#include "gdkseatprivate.h"
+#include "gdk-private.h"
+
#include "pointer-gestures-unstable-v1-client-protocol.h"
#include "tablet-unstable-v2-client-protocol.h"
@@ -3472,8 +3474,7 @@ tablet_tool_handle_proximity_out (void *data,
static double *
tablet_copy_axes (GdkWaylandTabletData *tablet)
{
- return g_memdup (tablet->axes,
- sizeof (double) * GDK_AXIS_LAST);
+ return g_memdup2 (tablet->axes, sizeof (double) * GDK_AXIS_LAST);
}
static void