aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-07-12 13:31:31 +0200
committerCorinna Vinschen <corinna@vinschen.de>2023-07-26 15:13:47 +0200
commitae03aa7303bff5d6814bc6c9e681128aee42eb6a (patch)
tree12336826a62813abc0bd126e4cf0c5dad6904b88 /winsup
parent25d65d6ec0532742d2d4121e4ddfda6295a4da78 (diff)
downloadnewlib-ae03aa7303bff5d6814bc6c9e681128aee42eb6a.zip
newlib-ae03aa7303bff5d6814bc6c9e681128aee42eb6a.tar.gz
newlib-ae03aa7303bff5d6814bc6c9e681128aee42eb6a.tar.bz2
Cygwin: gen_full_path_at: drop never reached code
The check if the local variable p is NULL is useless. The preceeding code always sets p to a valid pointer, or it crashes if path_ret is invalid (which would be a bug in Cygwin). Fixes: c57b57e5c43a ("* cygwin.din: Sort.") Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/syscalls.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index f1cd569..8d3ec46 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -4449,11 +4449,6 @@ gen_full_path_at (char *path_ret, int dirfd, const char *pathname,
}
p = stpcpy (path_ret, cfd->get_name ());
}
- if (!p)
- {
- set_errno (ENOTDIR);
- return -1;
- }
if (pathname)
{
if (!*pathname)