From: Ben Pfaff Date: Fri, 8 Jul 2022 22:44:43 +0000 (-0700) Subject: gui: Use g_memdup2() instead of deprecated g_memdup(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=b6604844de4aadfb63903b7e4df6bf0102eadfef gui: Use g_memdup2() instead of deprecated g_memdup(). --- diff --git a/src/ui/gui/psppire-dialog-action-recode.c b/src/ui/gui/psppire-dialog-action-recode.c index 5bbaf43df7..0087e4403e 100644 --- a/src/ui/gui/psppire-dialog-action-recode.c +++ b/src/ui/gui/psppire-dialog-action-recode.c @@ -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); diff --git a/src/ui/gui/psppire-format.c b/src/ui/gui/psppire-format.c index c44684050f..392ac73b2d 100644 --- a/src/ui/gui/psppire-format.c +++ b/src/ui/gui/psppire-format.c @@ -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 diff --git a/src/ui/gui/psppire-val-chooser.c b/src/ui/gui/psppire-val-chooser.c index 72ffac5111..f3f5624732 100644 --- a/src/ui/gui/psppire-val-chooser.c +++ b/src/ui/gui/psppire-val-chooser.c @@ -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);