Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2017-09-17 05:04:19 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-10-09 12:44:11 +0300
commit7212b571a5b8ba855c47e16db8cde829a1340a76 (patch)
treee5504591e3653a0de8e58a3815a5e524c74fe176 /winsup/cygwin/sigproc.cc
parent5952d5f08f3200e7b7f65ef8568bfef9b4707940 (diff)
cygwin: Remove comparison of 'this' to NULL in _pinfo::exists
Fix all callers.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 36fc64903..92fa5ea3d 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -152,7 +152,8 @@ proc_can_be_signalled (_pinfo *p)
bool __reg1
pid_exists (pid_t pid)
{
- return pinfo (pid)->exists ();
+ pinfo p (pid);
+ return p && p->exists ();
}
/* Return true if this is one of our children, false otherwise. */
@@ -1135,7 +1136,7 @@ remove_proc (int ci)
if (_my_tls._ctinfo != procs[ci].wait_thread)
procs[ci].wait_thread->terminate_thread ();
}
- else if (procs[ci]->exists ())
+ else if (procs[ci] && procs[ci]->exists ())
return true;
sigproc_printf ("removing procs[%d], pid %d, nprocs %d", ci, procs[ci]->pid,