Commit d37177ba authored by Yaowei Bai's avatar Yaowei Bai Committed by Al Viro

fs/attr.c: is_sxid can be boolean

This patch makes is_sxid return bool to improve readability
due to this particular function only using either one or zero
as its return value.

No functional change.
Signed-off-by: default avatarYaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0e3ef1fe
...@@ -2963,7 +2963,7 @@ int __init get_filesystem_list(char *buf); ...@@ -2963,7 +2963,7 @@ int __init get_filesystem_list(char *buf);
#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
(flag & __FMODE_NONOTIFY))) (flag & __FMODE_NONOTIFY)))
static inline int is_sxid(umode_t mode) static inline bool is_sxid(umode_t mode)
{ {
return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment