]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Remove the char * casts from arguments to do_lstat,
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 25 Feb 2022 09:46:24 +0000 (09:46 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 1 Mar 2022 02:00:26 +0000 (13:00 +1100)
do_readdir and do_stat paths since the underlying functions now take a const
char *. Patch from vapier at gentoo.org.

OpenBSD-Commit-ID: 9e4d964dbfb0ed683a2a2900711b88e7f1c0297b

sftp-glob.c

index f573f98f01ece551d13e2fca4845eb97a4385946..764e99552d42615d88a0d597e48eb7f6b83240ef 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-glob.c,v 1.29 2019/11/13 04:47:52 deraadt Exp $ */
+/* $OpenBSD: sftp-glob.c,v 1.30 2022/02/25 09:46:24 dtucker Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
@@ -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);