Mailing List Archive

[PATCH v3] drop some obsolete (char*) casts
Some of these were in here to cast away const because underlying APIs
were missing const markings themselves, but those have been fixed now,
so clean these up.
---
sftp-glob.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sftp-glob.c b/sftp-glob.c
index f573f98f01ec..a59de347b622 100644
--- a/sftp-glob.c
+++ b/sftp-glob.c
@@ -51,7 +51,7 @@ fudge_opendir(const char *path)

r = xcalloc(1, sizeof(*r));

- if (do_readdir(cur.conn, (char *)path, &r->dir)) {
+ if (do_readdir(cur.conn, path, &r->dir)) {
free(r);
return(NULL);
}
@@ -112,7 +112,7 @@ fudge_lstat(const char *path, struct stat *st)
{
Attrib *a;

- if (!(a = do_lstat(cur.conn, (char *)path, 1)))
+ if (!(a = do_lstat(cur.conn, path, 1)))
return(-1);

attrib_to_stat(a, st);
@@ -125,7 +125,7 @@ fudge_stat(const char *path, struct stat *st)
{
Attrib *a;

- if (!(a = do_stat(cur.conn, (char *)path, 1)))
+ if (!(a = do_stat(cur.conn, path, 1)))
return(-1);

attrib_to_stat(a, st);
--
2.33.0

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: [PATCH v3] drop some obsolete (char*) casts [ In reply to ]
> Some of these were in here to cast away const because underlying APIs
> were missing const markings themselves, but those have been fixed now,
> so clean these up.

ping ... the v3 patch should be pretty harmless
-mike
Re: [PATCH v3] drop some obsolete (char*) casts [ In reply to ]
On Fri, 25 Feb 2022 at 05:51, Mike Frysinger <vapier@gentoo.org> wrote:
> > Some of these were in here to cast away const because underlying APIs
> > were missing const markings themselves, but those have been fixed now,
> > so clean these up.
>
> ping ... the v3 patch should be pretty harmless

Applied upstream, thanks.

--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev