diff options
author | Xiaoming Ni <nixiaoming@huawei.com> | 2022-05-05 11:01:08 +0800 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-05-05 17:48:04 +0530 |
commit | d62a70fda8c7d772191ca8781dca46714efdd8cc (patch) | |
tree | 99d780863aefacac618f8da657f8bf3af6b46197 /sysdeps/unix/sysv/linux/include/sys | |
parent | eff158b75dee466ac0c37a17b2165072ee0b7aeb (diff) | |
download | glibc-d62a70fda8c7d772191ca8781dca46714efdd8cc.zip glibc-d62a70fda8c7d772191ca8781dca46714efdd8cc.tar.gz glibc-d62a70fda8c7d772191ca8781dca46714efdd8cc.tar.bz2 |
adjtimex/adjtimex64: Use __nonnull to avoid null pointer
Add __nonnull((1)) to the adjtimex()/adjtimex64() function declaration
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/include/sys')
-rw-r--r-- | sysdeps/unix/sysv/linux/include/sys/timex.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/include/sys/timex.h b/sysdeps/unix/sysv/linux/include/sys/timex.h index 964a2c2..dd599b1 100644 --- a/sysdeps/unix/sysv/linux/include/sys/timex.h +++ b/sysdeps/unix/sysv/linux/include/sys/timex.h @@ -23,7 +23,7 @@ # ifndef _ISOMAC -extern int __adjtimex (struct timex *__ntx); +extern int __adjtimex (struct timex *__ntx) __nonnull ((1)); libc_hidden_proto (__adjtimex) # include <time.h> @@ -79,7 +79,7 @@ struct __timex64 }; extern int __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64); libc_hidden_proto (__clock_adjtime64); -extern int ___adjtimex64 (struct __timex64 *tx64); +extern int ___adjtimex64 (struct __timex64 *tx64) __nonnull ((1)); libc_hidden_proto (___adjtimex64) struct __ntptimeval64 |