aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2007-01-19 22:11:40 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2007-01-19 22:11:40 +0000
commit6e7d018049193efe9d092bb91c4416a332f28278 (patch)
tree1682fdb3dc3d9ca6012e3e4813b6203401ec6d0c /lib
parent7dcdf1bf5b4c9fe36bf6fdf98149154a3216f059 (diff)
downloadlibfuse-6e7d018049193efe9d092bb91c4416a332f28278.tar.gz
merge up to fuse_2_6_merge1
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse.c7
-rw-r--r--lib/mount.c2
-rw-r--r--lib/ulockmgr.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index 4446245..994a31f 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -2295,7 +2295,6 @@ static void fuse_flush(fuse_req_t req, fuse_ino_t ino,
err = -ENOSYS;
if (f->op.flush)
err = fuse_do_flush(f, req, path, fi);
- free(path);
}
if (f->op.lock) {
struct flock lock;
@@ -2314,6 +2313,7 @@ static void fuse_flush(fuse_req_t req, fuse_ino_t ino,
if (err == -ENOSYS)
err = 0;
}
+ free(path);
pthread_rwlock_unlock(&f->tree_lock);
reply_err(req, err);
}
@@ -2948,9 +2948,10 @@ static struct fuse *fuse_new_common_compat(int fd, const char *opts,
struct fuse *f;
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
+ if (fuse_opt_add_arg(&args, "") == -1)
+ return NULL;
if (opts &&
- (fuse_opt_add_arg(&args, "") == -1 ||
- fuse_opt_add_arg(&args, "-o") == -1 ||
+ (fuse_opt_add_arg(&args, "-o") == -1 ||
fuse_opt_add_arg(&args, opts) == -1)) {
fuse_opt_free_args(&args);
return NULL;
diff --git a/lib/mount.c b/lib/mount.c
index a72294b..cbdedf3 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -151,7 +151,7 @@ static int receive_fd(int fd)
struct iovec iov;
char buf[1];
int rv;
- char ccmsg[CMSG_SPACE(sizeof(int))];
+ size_t ccmsg[CMSG_SPACE(sizeof(int)) / sizeof(size_t)];
struct cmsghdr *cmsg;
iov.iov_base = buf;
diff --git a/lib/ulockmgr.c b/lib/ulockmgr.c
index 9e9c2b6..bf27b36 100644
--- a/lib/ulockmgr.c
+++ b/lib/ulockmgr.c
@@ -75,7 +75,7 @@ static int ulockmgr_send_message(int sock, void *buf, size_t buflen,
struct msghdr msg;
struct cmsghdr *p_cmsg;
struct iovec vec;
- char cmsgbuf[CMSG_SPACE(sizeof(int) * MAX_SEND_FDS)];
+ size_t cmsgbuf[CMSG_SPACE(sizeof(int) * MAX_SEND_FDS) / sizeof(size_t)];
int res;
assert(numfds <= MAX_SEND_FDS);