=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp-glob.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- src/usr.bin/ssh/sftp-glob.c 2001/07/14 15:10:17 1.8 +++ src/usr.bin/ssh/sftp-glob.c 2001/12/19 07:18:56 1.9 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp-glob.c,v 1.8 2001/07/14 15:10:17 stevesk Exp $"); +RCSID("$OpenBSD: sftp-glob.c,v 1.9 2001/12/19 07:18:56 deraadt Exp $"); #include @@ -51,9 +51,9 @@ fudge_opendir(const char *path) { struct SFTP_OPENDIR *r; - + r = xmalloc(sizeof(*r)); - + if (do_readdir(cur.fd_in, cur.fd_out, (char*)path, &r->dir)) return(NULL); @@ -66,7 +66,7 @@ fudge_readdir(struct SFTP_OPENDIR *od) { static struct dirent ret; - + if (od->dir[od->offset] == NULL) return(NULL); @@ -88,7 +88,7 @@ attrib_to_stat(Attrib *a, struct stat *st) { memset(st, 0, sizeof(*st)); - + if (a->flags & SSH2_FILEXFER_ATTR_SIZE) st->st_size = a->size; if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { @@ -107,12 +107,12 @@ fudge_lstat(const char *path, struct stat *st) { Attrib *a; - + if (!(a = do_lstat(cur.fd_in, cur.fd_out, (char*)path, 0))) return(-1); - + attrib_to_stat(a, st); - + return(0); } @@ -120,12 +120,12 @@ fudge_stat(const char *path, struct stat *st) { Attrib *a; - + if (!(a = do_stat(cur.fd_in, cur.fd_out, (char*)path, 0))) return(-1); - + attrib_to_stat(a, st); - + return(0); } @@ -138,7 +138,7 @@ pglob->gl_closedir = (void (*)(void *))fudge_closedir; pglob->gl_lstat = fudge_lstat; pglob->gl_stat = fudge_stat; - + memset(&cur, 0, sizeof(cur)); cur.fd_in = fd_in; cur.fd_out = fd_out;