From 181c31653e99af3d0f8549a87658437b0f66accc Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Fri, 14 Apr 2023 01:03:30 +0000 Subject: [PATCH] Nullability check for capability module. Bugs: b/245972273 Test: adb shell Change-Id: I9df50d82e7b86576912ed42e93b1e98c6ded6551 --- libc/include/sys/capability.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/include/sys/capability.h b/libc/include/sys/capability.h index 4cb698f06..b43bbf081 100644 --- a/libc/include/sys/capability.h +++ b/libc/include/sys/capability.h @@ -44,7 +44,7 @@ __BEGIN_DECLS * * Returns 0 on success, and returns -1 and sets `errno` on failure. */ -int capget(cap_user_header_t __hdr_ptr, cap_user_data_t __data_ptr); +int capget(cap_user_header_t _Nonnull __hdr_ptr, cap_user_data_t _Nullable __data_ptr); /** * [capset(2)](http://man7.org/linux/man-pages/man2/capset.2.html) sets the calling @@ -52,6 +52,6 @@ int capget(cap_user_header_t __hdr_ptr, cap_user_data_t __data_ptr); * * Returns 0 on success, and returns -1 and sets `errno` on failure. */ -int capset(cap_user_header_t __hdr_ptr, const cap_user_data_t __data_ptr); +int capset(cap_user_header_t _Nonnull __hdr_ptr, const cap_user_data_t _Nullable __data_ptr); __END_DECLS