Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273119

[PATCH 5/5] fs/attr.c: is_sxid can be boolean

From Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Newsgroups linux.kernel
Subject [PATCH 5/5] fs/attr.c: is_sxid can be boolean
Date 2015-11-19 14:10 +0100
Message-ID <qwx8n-1jR-37@gated-at.bofh.it> (permalink)
References <qvIfv-1qi-5@gated-at.bofh.it> <qwx8n-1jR-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
---
 include/linux/fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6b33ac4..bd14476 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2963,7 +2963,7 @@ int __init get_filesystem_list(char *buf);
 #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
 					    (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));
 }
-- 
1.9.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/5] fs/block_dev.c: make sb_is_blkdev_sb return bool when CONFIG_BLOCK undefined Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2015-11-17 07:50 +0100
  Re: [PATCH 1/5] fs/block_dev.c: make sb_is_blkdev_sb return bool when CONFIG_BLOCK undefined Jeff Moyer <jmoyer@redhat.com> - 2015-11-17 15:30 +0100
  [PATCH 5/5] fs/attr.c: is_sxid can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2015-11-19 14:10 +0100
  [PATCH 4/5] fs/bad_inode.c: is_bad_inode can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2015-11-19 14:10 +0100

csiph-web