This is the mail archive of the gdb-patches@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]

Re: [RFA 1/2] Check results of get_darwin_inferior


Le 8/2/18 à 9:30 PM, Tom Tromey a écrit :
"Xavier" == Xavier Roirand <roirand@adacore.com> writes:

diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index bb46cfbfcfa..6d7b80ddcb1 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -259,6 +259,9 @@ darwin_check_new_threads (struct inferior *inf)
darwin_inferior *darwin_inf = get_darwin_inferior (inf);
std::vector<darwin_thread_t *> new_thread_vec;
+  if (darwin_inf == nullptr)
+    return;

Xavier> Wouldn't return NULL be better here ?

In git, darwin_check_new_threads returns void.
Maybe it's different in your tree?

Agree, return only is fine :)


Tom



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