From 504959d8fc5840d90bc8648c5570251616591732 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Sat, 16 Sep 2017 22:04:10 -0400
Subject: [PATCH] cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::fds

Fix all callers.
---
 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 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)
     {