hello.c: don't use constant instead of magic number
authorguraga <rulumasi@dodsi.com>
Tue, 28 Mar 2017 15:57:23 +0000 (22:57 +0700)
committerNikolaus Rath <Nikolaus@rath.org>
Tue, 28 Mar 2017 15:57:23 +0000 (08:57 -0700)
example/hello.c

index 67932e04fd5a26709a58ecf1145aaaa4a3090183..8dec6adef7f91584b012b6a1a288b74ab34fce51 100644 (file)
@@ -105,7 +105,7 @@ static int hello_open(const char *path, struct fuse_file_info *fi)
        if (strcmp(path+1, options.filename) != 0)
                return -ENOENT;
 
-       if ((fi->flags & 3) != O_RDONLY)
+       if ((fi->flags & O_ACCMODE) != O_RDONLY)
                return -EACCES;
 
        return 0;