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
path: root/winsup
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2017-09-17 05:04:16 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-10-09 12:44:11 +0300
commit6cd1978fc81a2046fa0b27ff63b015f31d49ec77 (patch)
tree807e78898c19cf3748d041979e87525ea91c922b /winsup
parent56f23a510703b399bdf9268b0a6230470531ab8c (diff)
cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::fd
Fix all callers.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_process.cc2
-rw-r--r--winsup/cygwin/pinfo.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 7f122fbe4..360d8ea81 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -391,7 +391,7 @@ format_process_fd (void *data, char *&destbuf)
set_errno (ENOENT);
return 0;
}
- destbuf = p->fd (fd, fs);
+ destbuf = p ? p->fd (fd, fs) : NULL;
if (!destbuf || !*destbuf)
{
set_errno (ENOENT);
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 72aa658eb..044c4fc3c 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -832,7 +832,7 @@ char *
_pinfo::fd (int fd, size_t &n)
{
char *s;
- if (!this || !pid)
+ if (!pid)
return NULL;
if (pid != myself->pid)
{