xiaoxiang781216 commented on code in PR #19599: URL: https://github.com/apache/nuttx/pull/19599#discussion_r3699587040
########## fs/inode/inode.h: ########## @@ -449,10 +448,18 @@ int inode_checkperm(FAR struct inode *inode, int amode); * * Takes the inode tree read lock unless INODE_CHECK_LOCKED is set in * 'flags' (caller already holds inode_lock/inode_rlock). + * Empty macros when CONFIG_FS_PERMISSION is disabled (zero cost). * ****************************************************************************/ +#ifdef CONFIG_FS_PERMISSION +int inode_checkperm(FAR struct inode *inode, int amode); int inode_checkpathperm(FAR struct inode *inode, int amode, int flags); +#else +# define inode_checkperm(inode, amode) ((int)OK) +# define inode_checkpathperm(inode, amode, flags) ((int)OK) Review Comment: remove the cast and change OK to 0 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
