aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile/compile-c-support.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/compile/compile-c-support.c')
-rw-r--r--gdb/compile/compile-c-support.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c
index 0d32350..ac8888f 100644
--- a/gdb/compile/compile-c-support.c
+++ b/gdb/compile/compile-c-support.c
@@ -185,18 +185,18 @@ static void
write_macro_definitions (const struct block *block, CORE_ADDR pc,
struct ui_file *file)
{
- gdb::unique_xmalloc_ptr<struct macro_scope> scope;
+ macro_scope scope;
if (block != NULL)
scope = sal_macro_scope (find_pc_line (pc, 0));
else
scope = default_macro_scope ();
- if (scope == NULL)
+ if (!scope.is_valid ())
scope = user_macro_scope ();
- if (scope != NULL && scope->file != NULL && scope->file->table != NULL)
+ if (scope.is_valid () && scope.file->table != nullptr)
{
- macro_for_each_in_scope (scope->file, scope->line,
+ macro_for_each_in_scope (scope.file, scope.line,
[&] (const char *name,
const macro_definition *macro,
macro_source_file *source,