]> Git Repo - qemu.git/commitdiff
virtiofsd: Convert some functions to return bool
authorGreg Kurz <[email protected]>
Fri, 12 Mar 2021 14:10:02 +0000 (15:10 +0100)
committerDr. David Alan Gilbert <[email protected]>
Mon, 15 Mar 2021 20:01:55 +0000 (20:01 +0000)
Both currently only return 0 or 1.

Signed-off-by: Greg Kurz <[email protected]>
Message-Id: <20210312141003[email protected]>
Reviewed-by: Connor Kuehl <[email protected]>
Reviewed-by: Vivek Goyal <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
tools/virtiofsd/passthrough_ll.c

index cf453eea9b0d62d87f3aeab0de9ebd028589ee64..b144320e48968aae414789d2f380f42d262a24e0 100644 (file)
@@ -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);
This page took 0.030473 seconds and 4 git commands to generate.