[gtk/wip/otte/for-master: 6/11] applicationaccels: Use g_renew()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 6/11] applicationaccels: Use g_renew()
- Date: Fri, 6 Mar 2020 04:55:49 +0000 (UTC)
commit df282a13bbd920c3aedf73bd0e6a93bb69841721
Author: Benjamin Otte <otte redhat com>
Date: Fri Mar 6 05:06:25 2020 +0100
applicationaccels: Use g_renew()
gtk/gtkapplicationaccels.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtkapplicationaccels.c b/gtk/gtkapplicationaccels.c
index b4a14b9daa..a27501facf 100644
--- a/gtk/gtkapplicationaccels.c
+++ b/gtk/gtkapplicationaccels.c
@@ -96,8 +96,7 @@ add_entry (GtkApplicationAccels *accels,
else
n = 0;
- new = g_new (const gchar *, n + 1 + 1);
- memcpy (new, old, n * sizeof (const gchar *));
+ new = g_renew (const gchar *, old, n + 1 + 1);
new[n] = action_and_target;
new[n + 1] = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]