From 18f6910bc1e826b02b78972f2bafef2a7b8e57df Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 12 Mar 2018 23:34:53 +0100 Subject: use gboolean type --- src/volumefs.c | 8 +++++--- 1 file 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); -- cgit v1.2.3