public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_4-branch] Cygwin: gen_full_path_at: drop never reached code Date: Wed, 26 Jul 2023 13:20:13 +0000 (GMT) [thread overview] Message-ID: <20230726132013.6A4133858D35@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=26775886a3b4d3c858f40f6f42b61f866d9c1c2a commit 26775886a3b4d3c858f40f6f42b61f866d9c1c2a Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Wed Jul 12 13:31:31 2023 +0200 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Wed Jul 26 15:19:59 2023 +0200 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> Diff: --- winsup/cygwin/syscalls.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 5adc614ec30f..a8b8206af0fc 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)
reply other threads:[~2023-07-26 13:20 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230726132013.6A4133858D35@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).