summaryrefslogtreecommitdiff
path: root/libftpconn/unix.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-10-20 08:38:41 +0000
committerRoland McGrath <roland@gnu.org>1998-10-20 08:38:41 +0000
commitfc40a731d23f893be2cb7699d7e078568d4c210c (patch)
tree9f1c90570e03a7c4082bee3fca2ced1755ac98a0 /libftpconn/unix.c
parent6b0d5d23a26adea266903f285f7424a2f93863cb (diff)
Add braces to silence gcc warnings.
Diffstat (limited to 'libftpconn/unix.c')
-rw-r--r--libftpconn/unix.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index b7a79cab..e3277721 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -1,6 +1,6 @@
/* Unix-specific ftpconn hooks
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -347,7 +347,7 @@ drwxrwxrwt 7 34 archive 512 May 1 14:28 /tmp
p = e; \
u; \
})
-
+
/* Link count. */
SKIP_WS ();
stat->st_nlink = PARSE_INT ();
@@ -595,20 +595,23 @@ ftp_conn_unix_cont_get_stats (struct ftp_conn *conn, int fd, void *state,
}
if (strchr (name, '/'))
- if (s->contents)
- /* We know that the name originally request had a slash in it
- (because we added one if necessary), so if a name in the
- listing has one too, it can't be the contents of a
- directory; if this is the case and we wanted the contents,
- this must not be a directory. */
- {
- err = ENOTDIR;
- goto finished;
- }
- else if (s->added_slash)
- /* S->name must be the same name we passed; if we added a `./'
- prefix, removed it so the client gets back what it passed. */
- name += 2;
+ {
+ if (s->contents)
+ /* We know that the name originally request had a slash in
+ it (because we added one if necessary), so if a name in
+ the listing has one too, it can't be the contents of a
+ directory; if this is the case and we wanted the
+ contents, this must not be a directory. */
+ {
+ err = ENOTDIR;
+ goto finished;
+ }
+ else if (s->added_slash)
+ /* S->name must be the same name we passed; if we added a
+ `./' prefix, removed it so the client gets back what it
+ passed. */
+ name += 2;
+ }
/* Pass only directory-relative names to the callback function. */
name = basename (name);