tomoyo: fix clang pointer arithmetic warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 28 Oct 2020 14:14:04 +0000 (23:14 +0900)
committerTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Wed, 28 Oct 2020 14:21:43 +0000 (23:21 +0900)
commitd9594e0409651a237903a13c9718df889f43d43b
tree740a7c0485d5023b5604b4b913e4cd1b81b27e0a
parentd4fe911741e58e62db1758aa4cd7b09c1064cce1
tomoyo: fix clang pointer arithmetic warning

clang warns about additions on NULL pointers being undefined in C:

security/tomoyo/securityfs_if.c:226:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
        securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key,

Change the code to instead use a cast through uintptr_t to avoid
the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
security/tomoyo/securityfs_if.c