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] Check func against 0 rather than NULL


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

commit fb3f3d25c3cbf561d33b258ff11fd8139f6ad75d
Author: Yao Qi <yao.qi@linaro.org>
Date:   Wed Mar 30 17:02:46 2016 +0100

    Check func against 0 rather than NULL
    
    Variable 'func''s type is CORE_ADDR, so it should be compared with 0
    rather than NULL.  This causes a build error.
    
    This patch fixes this.
    
    gdb:
    
    2016-03-30  Yao Qi  <yao.qi@linaro.org>
    
    	* arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against
    	0 rather than NULL.

Diff:
---
 gdb/ChangeLog  | 5 +++++
 gdb/arm-tdep.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bb9b974..9e016ae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2016-03-30  Yao Qi  <yao.qi@linaro.org>
 
+	* arm-tdep.c (arm_epilogue_frame_this_id): Check 'func' against
+	0 rather than NULL.
+
+2016-03-30  Yao Qi  <yao.qi@linaro.org>
+
 	* arm-tdep.c: (arm_make_epilogue_frame_cache): New function.
 	(arm_epilogue_frame_this_id): New function.
 	(arm_epilogue_frame_prev_register): New function.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 01f53d6..0412f71 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2714,7 +2714,7 @@ arm_epilogue_frame_this_id (struct frame_info *this_frame,
      fall back to just using the current PC.  */
   pc = get_frame_pc (this_frame);
   func = get_frame_func (this_frame);
-  if (func == NULL)
+  if (func == 0)
     func = pc;
 
   (*this_id) = frame_id_build (cache->prev_sp, pc);


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