mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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>
This commit is contained in:
committed by
Siddhesh Poyarekar
parent
eff158b75d
commit
d62a70fda8
@ -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
|
||||
|
Reference in New Issue
Block a user