diff options
author | Ken Brown <kbrown@cornell.edu> | 2017-09-16 22:04:10 -0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-10-09 11:44:11 +0200 |
commit | 504959d8fc5840d90bc8648c5570251616591732 (patch) | |
tree | 12dc2dd1c82014926ccbc553d852f4371e5962fd | |
parent | 47bbe231054e84f1acaabf9610f75580b5b81fe3 (diff) | |
download | cygnal-504959d8fc5840d90bc8648c5570251616591732.tar.gz cygnal-504959d8fc5840d90bc8648c5570251616591732.tar.bz2 cygnal-504959d8fc5840d90bc8648c5570251616591732.zip |
cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::fds
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 bbb44fa56..97436dd1b 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -375,7 +375,7 @@ format_process_fd (void *data, char *&destbuf) { if (destbuf) cfree (destbuf); - destbuf = p->fds (fs); + destbuf = p ? p->fds (fs) : NULL; *((process_fd_t *) data)->fd_type = virt_symlink; } else diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index a504828fe..bba9ee494 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -856,7 +856,7 @@ char * _pinfo::fds (size_t &n) { char *s; - if (!this || !pid) + if (!pid) return NULL; if (pid != myself->pid) { |