'struct expression *' -> gdb::unique_xmalloc_ptr<expression>
[deliverable/binutils-gdb.git] / gdb / dtrace-probe.c
index 242e3168b23456ed56bba56112fe24b203d8f603..cbeeea8e572c7baefcd83f658003bc138672985b 100644 (file)
@@ -413,7 +413,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
       for (j = 0; j < ret->probe_argc; j++)
        {
          struct dtrace_probe_arg arg;
-         struct expression *expr = NULL;
+         expression_up expr;
 
          /* Set arg.expr to ensure all fields in expr are initialized and
             the compiler will not warn when arg is used.  */
@@ -430,11 +430,11 @@ dtrace_process_dof_probe (struct objfile *objfile,
 
          TRY
            {
-             expr = parse_expression_with_language (arg.type_str, language_c);
+             expr = gdb::move (parse_expression_with_language (arg.type_str,
+                                                               language_c));
            }
          CATCH (ex, RETURN_MASK_ERROR)
            {
-             expr = NULL;
            }
          END_CATCH
 
This page took 0.025021 seconds and 4 git commands to generate.