https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=be436ad2a31ac3b00dabc0d39119e5fa130a2dd6
commit be436ad2a31ac3b00dabc0d39119e5fa130a2dd6 Author: Ken Brown <kbr...@cornell.edu> Date: Sat Sep 16 22:04:11 2017 -0400 cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::root Fix all callers. Diff: --- winsup/cygwin/fhandler_process.cc | 2 +- winsup/cygwin/pinfo.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 97436dd..08cc7ea 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -478,7 +478,7 @@ format_process_root (void *data, char *&destbuf) cfree (destbuf); destbuf = NULL; } - destbuf = p->root (fs); + destbuf = p ? p->root (fs) : NULL; if (!destbuf || !*destbuf) { destbuf = cstrdup ("<defunct>"); diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index bba9ee4..9fe1b3a 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -884,7 +884,7 @@ char * _pinfo::root (size_t& n) { char *s; - if (!this || !pid) + if (!pid) return NULL; if (pid != myself->pid && !ISSTATE (this, PID_NOTCYGWIN)) {