This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/5] windows-nat: Don't use ternary conditional operator in get_windows_debug_event
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: gdb-patches at sourceware dot org
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Thu, 16 Apr 2015 20:23:25 +0100
- Subject: [PATCH 1/5] windows-nat: Don't use ternary conditional operator in get_windows_debug_event
- Authentication-results: sourceware.org; auth=none
- References: <1429009382-21040-1-git-send-email-jon dot turney at dronecode dot org dot uk> <1429212209-20548-1-git-send-email-jon dot turney at dronecode dot org dot uk>
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 | 5 +++++
gdb/windows-nat.c | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
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:
--
2.1.4