summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sftp-glob.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-12-19 07:18:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-12-19 07:18:57 +0000
commit4a6c79ff4f05aaae32458104529a9a9e0d3d208b (patch)
tree913e2f47bf991c8855fa3c28475f2fb77b764baa /usr.bin/ssh/sftp-glob.c
parent8130d56a7bb2e09e2c8b782f3f4a54133a0bb161 (diff)
basic KNF done while i was looking for something else
Diffstat (limited to 'usr.bin/ssh/sftp-glob.c')
-rw-r--r--usr.bin/ssh/sftp-glob.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/ssh/sftp-glob.c b/usr.bin/ssh/sftp-glob.c
index 048c9f6be12..607a8972784 100644
--- a/usr.bin/ssh/sftp-glob.c
+++ b/usr.bin/ssh/sftp-glob.c
@@ -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 <glob.h>
@@ -51,9 +51,9 @@ static void *
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 @@ static struct dirent *
fudge_readdir(struct SFTP_OPENDIR *od)
{
static struct dirent ret;
-
+
if (od->dir[od->offset] == NULL)
return(NULL);
@@ -88,7 +88,7 @@ static void
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 @@ static int
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 @@ static int
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 @@ remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
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;