summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2018-03-12 23:34:53 +0100
committerJavier <dev.git@javispedro.com>2018-03-12 23:34:53 +0100
commit18f6910bc1e826b02b78972f2bafef2a7b8e57df (patch)
tree7b0610a73079c6fe7780cba097e9ebd33b9ca2d0 /src
parente9ab85887d6bae3aaa486caffb9a15e9d8ec5498 (diff)
downloadvolumefs-master.tar.gz
volumefs-master.zip
use gboolean typeHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/volumefs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/volumefs.c b/src/volumefs.c
index 392db8f..e60aa38 100644
--- a/src/volumefs.c
+++ b/src/volumefs.c
@@ -103,7 +103,7 @@ static int volumesfs_getattr(const char *path, struct stat *stbuf)
stbuf->st_nlink = 2;
} else {
G_LOCK(mounts);
- int mount_exists = g_hash_table_lookup(mounts, path + 1) != NULL;
+ gboolean mount_exists = g_hash_table_lookup(mounts, path + 1) != NULL;
G_UNLOCK(mounts);
if (mount_exists) {
@@ -153,11 +153,13 @@ static int volumesfs_readlink(const char *path, char *buf, size_t size)
}
G_LOCK(mounts);
- int mount_exists = 0;
+ gboolean mount_exists;
gchar *mountpoint = g_hash_table_lookup(mounts, path + 1);
if (mountpoint) {
g_strlcpy(buf, mountpoint, size);
- mount_exists = 1;
+ mount_exists = TRUE;
+ } else {
+ mount_exists = FALSE;
}
G_UNLOCK(mounts);