[02/17,PowerPC] Fix two if statements in gdb/ppc-linux-nat.c

Message ID 20180713135226.2321-3-pedromfc@linux.ibm.com
State Superseded
Headers show
Series
  • GDB support for more powerpc registers on linux
Related show

Commit Message

Pedro Franco de Carvalho July 13, 2018, 1:52 p.m.
This patch changes two if statements to else if statements in
ppc-linux-nat.c:fetch_register for clarity.

gdb/ChangeLog:
YYYY-MM-DD  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>

	* ppc-linux-nat.c (fetch_register): Change if statement to else
	if.
	(store_register): Likewise.
---
 gdb/ppc-linux-nat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.13.6

Patch

diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 9719a0e906..47028b8688 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -554,7 +554,7 @@  fetch_register (struct regcache *regcache, int tid, int regno)
         AltiVec registers, fall through and return zeroes, because
         regaddr will be -1 in this case.  */
     }
-  if (vsx_register_p (gdbarch, regno))
+  else if (vsx_register_p (gdbarch, regno))
     {
       if (have_ptrace_getsetvsxregs)
 	{
@@ -933,7 +933,7 @@  store_register (const struct regcache *regcache, int tid, int regno)
       store_altivec_registers (regcache, tid, regno);
       return;
     }
-  if (vsx_register_p (gdbarch, regno))
+  else if (vsx_register_p (gdbarch, regno))
     {
       store_vsx_registers (regcache, tid, regno);
       return;