Fix sometimes-uninitialized warning in gdbscm_value_address
[deliverable/binutils-gdb.git] / gdb / guile / scm-value.c
index 0dc66302ed3f6fa3bda237d46b0e4fe0e51b8826..3732666a8897a64e9c9af6b1c46e0398f0b16971 100644 (file)
@@ -421,24 +421,19 @@ gdbscm_value_address (SCM self)
 
   if (SCM_UNBNDP (v_smob->address))
     {
-      struct value *res_val = NULL;
       struct cleanup *cleanup
        = make_cleanup_value_free_to_mark (value_mark ());
-      SCM address;
+      SCM address = SCM_BOOL_F;
 
       TRY
        {
-         res_val = value_addr (value);
+         address = vlscm_scm_from_value (value_addr (value));
        }
       CATCH (except, RETURN_MASK_ALL)
        {
-         address = SCM_BOOL_F;
        }
       END_CATCH
 
-      if (res_val != NULL)
-       address = vlscm_scm_from_value (res_val);
-
       do_cleanups (cleanup);
 
       if (gdbscm_is_exception (address))
This page took 0.024602 seconds and 4 git commands to generate.