Skip to content
Commit e604a5e4 authored by Xiaoming Ni's avatar Xiaoming Ni Committed by Adhemerval Zanella
Browse files

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: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent 7960c5ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment