diff options
author | Dave Davenport <qball@gmpclient.org> | 2024-02-27 20:47:51 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2024-02-27 20:47:51 +0100 |
commit | 3a97e0cb91112b17d0cc92ae5d5c2e5f925c042a (patch) | |
tree | 2d74adeff324d99e9d97bdc6c2215cc0150aef08 | |
parent | 1c41c3648897912383ef564cd792a5841bf9334f (diff) |
Replace deprecated by g_memdup to g_memdup2
-rw-r--r-- | lexer/theme-parser.y | 4 | ||||
-rw-r--r-- | source/theme.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y index 4d118619..57651a21 100644 --- a/lexer/theme-parser.y +++ b/lexer/theme-parser.y @@ -672,11 +672,11 @@ t_property_scale_type t_color_list : t_property_color { - $$ = g_list_append ( NULL, g_memdup ( (gconstpointer)&($1), sizeof ( ThemeColor ))); + $$ = g_list_append ( NULL, g_memdup2 ( (gconstpointer)&($1), sizeof ( ThemeColor ))); } | t_color_list T_COMMA t_property_color { - $$ = g_list_append ($1, g_memdup ( (gconstpointer)&($3), sizeof ( ThemeColor ))); + $$ = g_list_append ($1, g_memdup2 ( (gconstpointer)&($3), sizeof ( ThemeColor ))); } ; diff --git a/source/theme.c b/source/theme.c index 7084fe84..e39531fd 100644 --- a/source/theme.c +++ b/source/theme.c @@ -168,7 +168,7 @@ Property *rofi_theme_property_copy(const Property *p, for (GList *l = g_list_first(p->value.image.colors); l; l = g_list_next(l)) { retv->value.image.colors = g_list_append( - retv->value.image.colors, g_memdup(l->data, sizeof(ThemeColor))); + retv->value.image.colors, g_memdup2(l->data, sizeof(ThemeColor))); } break; } |