From 31795baa26645991b8368e067cdd1a4d81b570a5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 22 Sep 2011 11:23:31 +0900 Subject: [PATCH] obexd: Fix minor coding style issues in filesystem.c --- obexd/plugins/filesystem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/obexd/plugins/filesystem.c b/obexd/plugins/filesystem.c index 0fc52fcf4..4106c80b1 100644 --- a/obexd/plugins/filesystem.c +++ b/obexd/plugins/filesystem.c @@ -111,7 +111,6 @@ int verify_path(const char *path) return 0; t = realpath(path, NULL); - if (t == NULL) return -errno; @@ -171,10 +170,10 @@ static void *filesystem_open(const char *name, int oflag, mode_t mode, { struct stat stats; struct statvfs buf; - int fd = open(name, oflag, mode); + int fd, ret; uint64_t avail; - int ret; + fd = open(name, oflag, mode); if (fd < 0) { if (err) *err = -errno; @@ -501,7 +500,6 @@ static GString *append_listing(GString *object, const char *name, } ret = stat(name, &dstat); - if (ret < 0) { if (err) *err = -errno; @@ -525,7 +523,6 @@ static GString *append_listing(GString *object, const char *name, fullname = g_build_filename(name, ep->d_name, NULL); ret = stat(fullname, &fstat); - if (ret < 0) { DBG("stat: %s(%d)", strerror(errno), errno); g_free(filename); -- 2.47.3