windows-nat: Don't use ternary conditional operator in get_windows_debug_event
authorJon Turney <jon.turney@dronecode.org.uk>
Tue, 14 Apr 2015 18:42:07 +0000 (19:42 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Wed, 22 Apr 2015 17:30:52 +0000 (18:30 +0100)
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.

gdb/ChangeLog
gdb/windows-nat.c

index 27f7fdf0297ef4314511053adea8df7c6482ed63..7e25c19a477d84b54b731718a340324d12eaf1ea 100644 (file)
@@ -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
index fd3108308692ba3a8c626dd9ae17eccf62274034..dea4368729ee6a96da8c32ecd23278d22b4a346f 100644 (file)
@@ -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: