diff options
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 81f04c97a..f0423f30f 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -371,11 +371,6 @@ format_process_fd (void *data, char *&destbuf) case a trailing slash and more followup chars are allowed, provided the descriptor symlink points to a directory. */ char *fdp = strchr (path, '/') + 3; - if (!p) - { - set_errno (ENOENT); - return 0; - } /* The "fd" directory itself? */ if (fdp[0] =='\0' || (fdp[0] == '/' && fdp[1] == '\0')) { @@ -484,7 +479,7 @@ format_process_root (void *data, char *&destbuf) cfree (destbuf); destbuf = NULL; } - destbuf = p ? p->root (fs) : NULL; + destbuf = p->root (fs); if (!destbuf || !*destbuf) { destbuf = cstrdup ("<defunct>"); @@ -504,7 +499,7 @@ format_process_cwd (void *data, char *&destbuf) cfree (destbuf); destbuf = NULL; } - destbuf = p ? p->cwd (fs) : NULL; + destbuf = p->cwd (fs); if (!destbuf || !*destbuf) { destbuf = cstrdup ("<defunct>"); @@ -524,7 +519,7 @@ format_process_cmdline (void *data, char *&destbuf) cfree (destbuf); destbuf = NULL; } - destbuf = p ? p->cmdline (fs) : NULL; + destbuf = p->cmdline (fs); if (!destbuf || !*destbuf) { destbuf = cstrdup ("<defunct>"); |