Skip to content

Commit

Permalink
Depreciate R_STR_DUP (issue radareorg#20959)
Browse files Browse the repository at this point in the history
  • Loading branch information
satk0 committed Jul 12, 2024
1 parent 3b9bbba commit 31bb0e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions libr/arch/arch_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ R_API RArchConfig *r_arch_config_clone(RArchConfig *c) {
r_return_val_if_fail (c, NULL);
RArchConfig *ac = R_NEW0 (RArchConfig);
if (R_LIKELY (ac)) {
ac->arch = R_STR_DUP (c->arch);
ac->abi = R_STR_DUP (c->abi);
ac->cpu = R_STR_DUP (c->cpu);
ac->os = R_STR_DUP (c->os);
ac->arch = R_STRDUP (c->arch);
ac->abi = R_STRDUP (c->abi);
ac->cpu = R_STRDUP (c->cpu);
ac->os = R_STRDUP (c->os);
}
return ac;
}
Expand Down
4 changes: 2 additions & 2 deletions libr/bin/bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ R_API RBinImport *r_bin_import_clone(RBinImport *o) {
RBinImport *res = r_mem_dup (o, sizeof (*o));
if (res) {
res->name = r_bin_name_clone (o->name);
res->classname = R_STR_DUP (o->classname);
res->descriptor = R_STR_DUP (o->descriptor);
res->classname = R_STRDUP (o->classname);
res->descriptor = R_STRDUP (o->descriptor);
}
return res;
}
Expand Down
4 changes: 2 additions & 2 deletions libr/util/graph_drawable.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ R_API void r_graph_free_node_info(void *ptr) {
R_API RGraphNodeInfo *r_graph_create_node_info(const char *title, const char *body, ut64 offset) {
RGraphNodeInfo *data = R_NEW0 (RGraphNodeInfo);
if (data) {
data->title = R_STR_DUP (title);
data->body = R_STR_DUP (body);
data->title = R_STRDUP (title);
data->body = R_STRDUP (body);
data->offset = offset;
}
return data;
Expand Down

0 comments on commit 31bb0e7

Please sign in to comment.