[PATCH] time: Remove assert in reading of tz file
Florian Weimer
fweimer@redhat.com
Mon Dec 6 15:10:16 GMT 2021
* Christopher Wong via Libc-alpha:
> diff --git a/time/tzfile.c b/time/tzfile.c
> index 190a777152..874e10c9c7 100644
> --- a/time/tzfile.c
> +++ b/time/tzfile.c
> @@ -429,12 +429,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
> }
> }
> if (__tzname[0] == NULL)
> - {
> - /* This should only happen if there are no transition rules.
> - In this case there should be only one single type. */
> - assert (num_types == 1);
> - __tzname[0] = __tzstring (zone_names);
> - }
> + __tzname[0] = __tzstring (zone_names);
> if (__tzname[1] == NULL)
> __tzname[1] = __tzname[0];
Is this patch required to avoid an assert with 2021d and later?
Would you be able to add a test case using a precomputed zone file?
Thanks,
Florian
More information about the Libc-alpha
mailing list