diff options
author | 2021-01-04 12:07:38 +0800 | |
---|---|---|
committer | 2021-02-10 08:36:17 -0300 | |
commit | e604a5e4bb61267c58e6b6179209efe74ab5f675 (patch) | |
tree | 36f6a102ad8826dd3bc7f2314ab9407f57bfc82f /sysdeps/unix/sysv/linux/nios2/kernel_stat.h | |
parent | benchtests: Updated json bench-variant attribute (diff) | |
download | glibc-e604a5e4bb61267c58e6b6179209efe74ab5f675.tar.xz glibc-e604a5e4bb61267c58e6b6179209efe74ab5f675.zip |
setrlimit/getrlimit: Use __nonnull to avoid null pointer
Add __nonnull((2)) to the setrlimit()/getrlimit() function declaration
to avoid null pointer access.
-----
v2
According to the suggestions of the Adhemerval Zanella and Zack Weinberg:
use __nonnull() to check null pointers in the compilation phase.
do not add pointer check code to setrlimit()/getrlimit().
The validity of the "resource" parameter is checked in the syscall.
v1
https://public-inbox.org/libc-alpha/20201230114131.47589-1-nixiaoming@huawei.com/
-----
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/nios2/kernel_stat.h')
0 files changed, 0 insertions, 0 deletions