Skip to content

Commit

Permalink
Replace deprecated by g_memdup to g_memdup2
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveDavenport committed Feb 27, 2024
1 parent 1c41c36 commit 3a97e0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lexer/theme-parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -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 )));
}
;

Expand Down
2 changes: 1 addition & 1 deletion source/theme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3a97e0c

Please sign in to comment.