This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdb: tui: Minor fix to compare against NULL.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b93fd21dccc2cfa9a335ddba7435a341b49330ae

commit b93fd21dccc2cfa9a335ddba7435a341b49330ae
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Tue May 26 22:31:23 2015 +0100

    gdb: tui: Minor fix to compare against NULL.
    
    Minor coding standard fix to compare against NULL.
    
    gdb/ChangeLog:
    
    	* tui/tui-regs.c (tui_reg_next_command): Compare against NULL.

Diff:
---
 gdb/ChangeLog      | 4 ++++
 gdb/tui/tui-regs.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2a6a870..ccb5bde 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2015-05-26  Andrew Burgess  <andrew.burgess@embecosm.com>
 
+	* tui/tui-regs.c (tui_reg_next_command): Compare against NULL.
+
+2015-05-26  Andrew Burgess  <andrew.burgess@embecosm.com>
+
 	* tui/tui-regs.c (tui_reg_prev_command): New function.
 	(_initialize_tui_regs): Add 'prev' command for 'tui reg'.
 	* reggroups.c (reggroup_prev): New function.
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 7cf386d..6ac3c2b 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -570,7 +570,7 @@ tui_reg_next_command (char *arg, int from_tty)
       if (group == NULL)
         group = reggroup_next (gdbarch, NULL);
 
-      if (group)
+      if (group != NULL)
         tui_show_registers (group);
     }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]