1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

ntp_xxxtimex: Use __nonnull to avoid null pointer

ntp_gettime()
ntp_gettime64()
ntp_gettimex()
ntp_gettimex64()
ntp_adjtime()
Add __nonnull((1)) 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:
Xiaoming Ni
2022-05-05 11:01:09 +08:00
committed by Siddhesh Poyarekar
parent d62a70fda8
commit 6a9786b8ec
2 changed files with 8 additions and 8 deletions

View File

@@ -94,9 +94,9 @@ struct __ntptimeval64
long int __glibc_reserved3;
long int __glibc_reserved4;
};
extern int __ntp_gettime64 (struct __ntptimeval64 *ntv);
extern int __ntp_gettime64 (struct __ntptimeval64 *ntv) __nonnull ((1));
libc_hidden_proto (__ntp_gettime64)
extern int __ntp_gettimex64 (struct __ntptimeval64 *ntv);
extern int __ntp_gettimex64 (struct __ntptimeval64 *ntv) __nonnull ((1));
libc_hidden_proto (__ntp_gettimex64)
# endif