diff options
author | Zack Weinberg <zackw@panix.com> | 2019-08-19 13:51:25 -0400 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-10-30 17:11:10 -0300 |
commit | 2f2c76e1c8d8c4431c6395afeee420b71a4d772a (patch) | |
tree | 6888887c7a717121658d4c99ffb9390ba519b008 /time/gettimeofday.c | |
parent | 5e46749c64d51f50f8511ed99c1266d7c13e182b (diff) | |
download | glibc-2f2c76e1c8d8c4431c6395afeee420b71a4d772a.zip glibc-2f2c76e1c8d8c4431c6395afeee420b71a4d772a.tar.gz glibc-2f2c76e1c8d8c4431c6395afeee420b71a4d772a.tar.bz2 |
Make second argument of gettimeofday as 'void *'
Also make the public prototype of gettimeofday declare its second
argument with type "void *" unconditionally, consistent with POSIX.
It is also consistent with POSIX.
Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
powerpc64-linux-gnu, powerpc-linux-gnu, and aarch64-linux-gnu.
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'time/gettimeofday.c')
-rw-r--r-- | time/gettimeofday.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/time/gettimeofday.c b/time/gettimeofday.c index e8055b3..ddaf46f 100644 --- a/time/gettimeofday.c +++ b/time/gettimeofday.c @@ -23,10 +23,10 @@ If *TZ is not NULL, clear it. Returns 0 on success, -1 on errors. */ int -___gettimeofday (struct timeval *tv, struct timezone *tz) +___gettimeofday (struct timeval *restrict tv, void *restrict tz) { if (__glibc_unlikely (tz != 0)) - memset (tz, 0, sizeof *tz); + memset (tz, 0, sizeof (struct timezone)); struct timespec ts; if (__clock_gettime (CLOCK_REALTIME, &ts)) |