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] windows-nat: Don't use ternary conditional operator in get_windows_debug_event


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

commit 776704b9178cce5741e96555ceca514d84824815
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Apr 14 19:42:07 2015 +0100

    windows-nat: Don't use ternary conditional operator in get_windows_debug_event
    
    gdb/ChangeLog:
    
    2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
    
    	* windows-nat.c (get_windows_debug_event): Don't use ternary
    	conditional operator.

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

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27f7fdf..7e25c19 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-16  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* windows-nat.c (get_windows_debug_event): Don't use ternary
+	conditional operator.
+
 2015-04-21  Pierre Muller  <muller@sourceware.org>
 
 	PR pascal/17815
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index fd31083..dea4368 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1502,7 +1502,9 @@ get_windows_debug_event (struct target_ops *ops,
     {
       inferior_ptid = ptid_build (current_event.dwProcessId, 0,
 				  retval);
-      current_thread = th ?: thread_rec (current_event.dwThreadId, TRUE);
+      current_thread = th;
+      if (!current_thread)
+	current_thread = thread_rec (current_event.dwThreadId, TRUE);
     }
 
 out:


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