diff options
author | Greg Kurz <groug@kaod.org> | 2021-03-12 15:10:02 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2021-03-15 20:01:55 +0000 |
commit | 03ccaaae48fe1bd3ee0842717008fe74d7745680 (patch) | |
tree | 72caf36d64427a80fec8385e9d299bd80f2b8145 /tools/virtiofsd | |
parent | 20afcc23b3212784c84fb06062f66d9d2ce6865d (diff) | |
download | qemu-03ccaaae48fe1bd3ee0842717008fe74d7745680.zip qemu-03ccaaae48fe1bd3ee0842717008fe74d7745680.tar.gz qemu-03ccaaae48fe1bd3ee0842717008fe74d7745680.tar.bz2 |
virtiofsd: Convert some functions to return bool
Both currently only return 0 or 1.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20210312141003.819108-3-groug@kaod.org>
Reviewed-by: Connor Kuehl <ckuehl@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd')
-rw-r--r-- | tools/virtiofsd/passthrough_ll.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index cf453ee..b144320 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -223,17 +223,17 @@ static struct lo_inode *lo_find(struct lo_data *lo, struct stat *st, static int xattr_map_client(const struct lo_data *lo, const char *client_name, char **out_name); -static int is_dot_or_dotdot(const char *name) +static bool is_dot_or_dotdot(const char *name) { return name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')); } /* Is `path` a single path component that is not "." or ".."? */ -static int is_safe_path_component(const char *path) +static bool is_safe_path_component(const char *path) { if (strchr(path, '/')) { - return 0; + return false; } return !is_dot_or_dotdot(path); |