From c3b0185deb610736420f43b447a0a488d83ee0ae Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 16 Nov 2005 18:42:35 +0000 Subject: fix --- ChangeLog | 2 ++ opts.c | 8 +++++--- sshfs.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8c3f01..892d55e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * Replace EPROTO with the more portable EIO + * Fix bug in option parsing. Reported by Csaba Henk + 2005-10-29 Miklos Szeredi * Use FUSE version 25 if available diff --git a/opts.c b/opts.c index 4a70a03..1ee1038 100644 --- a/opts.c +++ b/opts.c @@ -59,11 +59,13 @@ static int process_option_group(char *arg, struct opt opts[], if (comma) arg = comma + 1; } - if (!remove_one && prevcomma) - *prevcomma = ','; + if (!remove_one) { + if (prevcomma) + *prevcomma = ','; + prevcomma = comma; + } if (!comma) break; - prevcomma = comma; } return remove; } diff --git a/sshfs.c b/sshfs.c index 7c1f3c2..8c99fc1 100644 --- a/sshfs.c +++ b/sshfs.c @@ -1465,7 +1465,7 @@ static int sshfs_open(const char *path, struct fuse_file_info *fi) return sshfs_open_common(path, 0, fi); } -static struct sshfs_file *get_sshfs_file(struct fuse_file_info *fi) +static inline struct sshfs_file *get_sshfs_file(struct fuse_file_info *fi) { return (struct sshfs_file *) (uintptr_t) fi->fh; } -- cgit v1.2.3