[PowerPC] Fix two if statements in gdb/ppc-linux-nat.c
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Fri, 26 Oct 2018 12:37:54 +0000 (09:37 -0300)
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Fri, 26 Oct 2018 12:52:37 +0000 (09:52 -0300)
This patch changes two if statements to else if statements in
ppc-linux-nat.c:fetch_register for clarity.

gdb/ChangeLog:
2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>

* ppc-linux-nat.c (fetch_register): Change if statement to else
if.
(store_register): Likewise.

gdb/ChangeLog
gdb/ppc-linux-nat.c

index ba069462b6f39f2f76521adae7da0bc17b85fd33..b6025a3fa1a118ac63e4bb6a7a17337b6f53f2ea 100644 (file)
@@ -1,3 +1,9 @@
+2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
+
+       * ppc-linux-nat.c (fetch_register): Change if statement to else
+       if.
+       (store_register): Likewise.
+
 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
 
        * rs6000-tdep.c: Remove reggroups.h include.
index 0b7052d0f6dee1e3686dc64dcc3f51f02620ec7f..f96fba4b00441fe0449f19e2e02d41b23350676e 100644 (file)
@@ -552,7 +552,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)
        {
@@ -928,7 +928,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;
This page took 0.032294 seconds and 4 git commands to generate.