gui: Use g_memdup2() instead of deprecated g_memdup().
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 8 Jul 2022 22:44:43 +0000 (15:44 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 8 Jul 2022 22:47:59 +0000 (15:47 -0700)
src/ui/gui/psppire-dialog-action-recode.c
src/ui/gui/psppire-format.c
src/ui/gui/psppire-val-chooser.c

index 5bbaf43df7bcc9c7adef3fa4f0af8fe00473ab7c..0087e4403e8b14a62aae8a7feff8abb7c91c76f2 100644 (file)
@@ -71,7 +71,7 @@ struct new_value
 static struct new_value *
 new_value_copy (struct new_value *nv)
 {
-  struct new_value *copy = g_memdup (nv, sizeof (*copy));
+  struct new_value *copy = g_memdup2 (nv, sizeof (*copy));
 
   if (nv->type == NV_STRING)
     copy->v.s = xstrdup (nv->v.s);
index c44684050fc534232a0a6ee9c3d4f3b7c593c870..392ac73b2d19e2440817464207f2c82a42676573 100644 (file)
@@ -21,7 +21,7 @@ static gpointer
 psppire_format_copy (gpointer boxed)
 {
   struct fmt_spec *format = boxed;
-  return g_memdup (format, sizeof *format);
+  return g_memdup2 (format, sizeof *format);
 }
 
 static void
index 72ffac51119d88ae3f1943152bf0cfb36b940b45..f3f56247321aa04512cd2b42a0c542dd44c64edb 100644 (file)
@@ -384,7 +384,7 @@ psppire_val_chooser_realize (GtkWidget *w)
 static struct old_value *
 old_value_copy (struct old_value *ov)
 {
-  struct old_value *copy = g_memdup (ov, sizeof (*copy));
+  struct old_value *copy = g_memdup2 (ov, sizeof (*copy));
 
   if (ov->type == OV_STRING)
     copy->v.s = g_strdup (ov->v.s);