summaryrefslogtreecommitdiff
path: root/src/volumesfs.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2017-04-18 00:32:55 +0200
committerJavier <dev.git@javispedro.com>2017-04-18 00:32:55 +0200
commit49be4df82c4c70354b116b7d651d6eb12db1e289 (patch)
tree75a97b9b6a3ec192b04b5e4a0290ef8c1a31cb5c /src/volumesfs.c
parentf9fced6a3372c133a54c6b7db084bc1fa1eebc97 (diff)
downloadvolumefs-49be4df82c4c70354b116b7d651d6eb12db1e289.tar.gz
volumefs-49be4df82c4c70354b116b7d651d6eb12db1e289.zip
fix plenty of undefined behavior
Diffstat (limited to 'src/volumesfs.c')
-rw-r--r--src/volumesfs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/volumesfs.c b/src/volumesfs.c
index 4226b94..acf991b 100644
--- a/src/volumesfs.c
+++ b/src/volumesfs.c
@@ -70,6 +70,8 @@ static gpointer sub_thread_main(gpointer user_data)
udisks_changed(client, NULL);
g_main_loop_run(main_loop);
+
+ return NULL;
}
static void * volumesfs_init(struct fuse_conn_info *conn)
@@ -79,6 +81,8 @@ static void * volumesfs_init(struct fuse_conn_info *conn)
mounts = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
sub_thread = g_thread_new("volumesfs-sub-thread", sub_thread_main, NULL);
+
+ return NULL;
}
static void volumesfs_destroy(void *user_data)
@@ -126,7 +130,6 @@ static int volumesfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler
filler(buf, ".", NULL, 0);
filler(buf, "..", NULL, 0);
-
GHashTableIter iter;
gchar *name;
g_hash_table_iter_init(&iter, mounts);
@@ -135,6 +138,8 @@ static int volumesfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler
}
G_UNLOCK(mounts);
+
+ return 0;
}
static int volumesfs_readlink(const char *path, char *buf, size_t size)
@@ -159,7 +164,7 @@ static struct fuse_operations volumesfs_oper = {
.init = volumesfs_init,
.destroy = volumesfs_destroy,
.getattr = volumesfs_getattr,
- .readdir = volumesfs_readdir,
+ .readdir = volumesfs_readdir,
.readlink = volumesfs_readlink
};