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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-07-12 14:31:31 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-07-26 16:19:59 +0300
commit26775886a3b4d3c858f40f6f42b61f866d9c1c2a (patch)
treeb52ceb0c2607d96692661c6c558d45172dd9e021
parent119c41065ae65c224b8d68397445c861065c3399 (diff)
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>
-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 5adc614ec..a8b8206af 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -4447,11 +4447,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)