From 65558ca5df91470521fda6b0bfdfbbdbd37ce4d3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 3 Oct 2022 13:51:58 -0600 Subject: Use scoped_value_mark in more places I looked at all the spots using value_mark, and converted all the straightforward ones to use scoped_value_mark instead. Regression tested on x86-64 Fedora 34. --- gdb/valarith.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/valarith.c') diff --git a/gdb/valarith.c b/gdb/valarith.c index c0e937d..7a9e130 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1615,7 +1615,7 @@ vector_binop (struct value *val1, struct value *val2, enum exp_opcode op) value *val = allocate_value (type1); gdb::array_view val_contents = value_contents_writeable (val); - value *mark = value_mark (); + scoped_value_mark mark; for (i = 0; i < high_bound1 - low_bound1 + 1; i++) { value *tmp = value_binop (value_subscript (val1, i), @@ -1623,7 +1623,6 @@ vector_binop (struct value *val1, struct value *val2, enum exp_opcode op) copy (value_contents_all (tmp), val_contents.slice (i * elsize, elsize)); } - value_free_to_mark (mark); return val; } -- cgit v1.1