[12/22] Trivial fix in dwarf_decode_macro_bytes

Message ID 20200322184523.28959-13-tom@tromey.com
State New
Headers show
Series
  • More splitting of dwarf2/read.c
Related show

Commit Message

Tom Tromey March 22, 2020, 6:45 p.m.
One spot in dwarf_decode_macro_bytes could use the existing "objfile"
local variable.

gdb/ChangeLog
2020-03-22  Tom Tromey  <tom@tromey.com>

	* dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
	variable.
---
 gdb/ChangeLog      | 5 +++++
 gdb/dwarf2/macro.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

-- 
2.17.2

Patch

diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c
index 49586399673..6c2d2514652 100644
--- a/gdb/dwarf2/macro.c
+++ b/gdb/dwarf2/macro.c
@@ -512,9 +512,9 @@  dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile,
 		    body = dwz->read_string (objfile, str_offset);
 		  }
 		else
-		  body = (dwarf2_per_objfile->str.read_string
-			  (dwarf2_per_objfile->objfile,
-			   str_offset, "DW_FORM_strp"));
+		  body = dwarf2_per_objfile->str.read_string (objfile,
+							      str_offset,
+							      "DW_FORM_strp");
 	      }
 
 	    is_define = (macinfo_type == DW_MACRO_define