gdb: make use of scoped_restore in unduplicated_should_be_inserted
authorAndrew Burgess <aburgess@redhat.com>
Wed, 5 Oct 2022 09:21:02 +0000 (10:21 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 20 Oct 2022 15:41:51 +0000 (16:41 +0100)
commitaaa141a0a99fb63f6209da75257c58d94404a963
tree779015fe6f5b7f68de5b9e6e0f5cb44a2cc0cd94
parent705b6305edc025c31606de16623a549697891193
gdb: make use of scoped_restore in unduplicated_should_be_inserted

I noticed that we could make use of a scoped_restore in the function
unduplicated_should_be_inserted.  I've also converted the function
return type from int to bool.

This change shouldn't make any difference, as I don't think anything
within should_be_inserted could throw an exception, but the change
doesn't hurt, and will help keep us safe if anything ever changes in
the future.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/breakpoint.c