This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 10/12] Warn when gettimeofday is called with non-null tzp argument.
- From: Zack Weinberg <zackw at panix dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Florian Weimer <fweimer at redhat dot com>, Lukasz Majewski <lukma at denx dot de>, Alistair Francis <alistair23 at gmail dot com>, Stepan Golosunov <stepan at golosunov dot pp dot ru>, Arnd Bergmann <arnd at arndb dot de>
- Date: Tue, 20 Aug 2019 15:03:14 -0400
- Subject: Re: [PATCH 10/12] Warn when gettimeofday is called with non-null tzp argument.
- References: <20190820132152.24100-1-zackw@panix.com> <20190820132152.24100-11-zackw@panix.com> <2dcf8274-e764-cb3b-2fba-c5a97a2ede4a@cs.ucla.edu>
On Tue, Aug 20, 2019 at 2:52 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> Zack Weinberg wrote:
> > - memset (tz, 0, sizeof *tz);
> > + memset (tz, 0, sizeof (struct timezone));
>
> This change isn't necessary, and I prefer the previous version as it's easier to
> audit.
I think you missed that this change also makes the type of `tz` be
`void *` (consistent with POSIX) so the older construct will not work
anymore.
zw