diff options
author | Xiaoming Ni <nixiaoming@huawei.com> | 2022-05-05 11:01:10 +0800 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-05-05 17:48:04 +0530 |
commit | ed2ddeffa5d4a51a0d7fe8af701e86cb2fd4ce05 (patch) | |
tree | 9f74ef0aabe8c4957b3806b88d8e5205b49b865a /sysdeps/unix/sysv/linux/bits | |
parent | 6a9786b8ecf84a23f9d108a46f58e9fcca70c4a9 (diff) | |
download | glibc-ed2ddeffa5d4a51a0d7fe8af701e86cb2fd4ce05.tar glibc-ed2ddeffa5d4a51a0d7fe8af701e86cb2fd4ce05.tar.gz glibc-ed2ddeffa5d4a51a0d7fe8af701e86cb2fd4ce05.tar.bz2 glibc-ed2ddeffa5d4a51a0d7fe8af701e86cb2fd4ce05.zip |
clock_adjtime: Use __nonnull to avoid null pointer
clock_adjtime()/clock_adjtime64()
Add __nonnull((2)) to avoid null pointer access.
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=27662
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29084
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/time.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h index efb4a014df..0485a1e181 100644 --- a/sysdeps/unix/sysv/linux/bits/time.h +++ b/sysdeps/unix/sysv/linux/bits/time.h @@ -75,13 +75,13 @@ extern long int __sysconf (int); __BEGIN_DECLS /* Tune a POSIX clock. */ -extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2)); #ifdef __USE_TIME_BITS64 # if defined(__REDIRECT_NTH) extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id, struct timex *__utx), - __clock_adjtime64); + __clock_adjtime64) __nonnull((2)); # else # define clock_adjtime __clock_adjtime64 # endif |