Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758454AbbKSNBF (ORCPT ); Thu, 19 Nov 2015 08:01:05 -0500 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:3865 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757855AbbKSNBD (ORCPT ); Thu, 19 Nov 2015 08:01:03 -0500 X-RM-TRANSID: 2ee5564dc80776f-4eee4 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee6564dc806589-42d3c From: Yaowei Bai To: akpm@linux-foundation.org, viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] fs/attr.c: is_sxid can be boolean Date: Thu, 19 Nov 2015 21:00:12 +0800 Message-Id: <1447938012-4477-2-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447938012-4477-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1447742411-8006-1-git-send-email-baiyaowei@cmss.chinamobile.com> <1447938012-4477-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1033 Lines: 34 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 --- 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/