diff options
author | Ken Brown <kbrown@cornell.edu> | 2017-09-16 22:04:11 -0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-10-09 11:44:11 +0200 |
commit | be436ad2a31ac3b00dabc0d39119e5fa130a2dd6 (patch) | |
tree | 42d93cd6031edb7a514e8e2171d4275195fc053e | |
parent | 504959d8fc5840d90bc8648c5570251616591732 (diff) | |
download | cygnal-be436ad2a31ac3b00dabc0d39119e5fa130a2dd6.tar.gz cygnal-be436ad2a31ac3b00dabc0d39119e5fa130a2dd6.tar.bz2 cygnal-be436ad2a31ac3b00dabc0d39119e5fa130a2dd6.zip |
cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::root
Fix all callers.
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 2 | ||||
-rw-r--r-- | 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 97436dd1b..08cc7ea92 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 bba9ee494..9fe1b3a88 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)) { |