mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
tzcode: Fully initialize structs before use.
Reported by: Coverity (CID 1502542, 1502548) MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38037
This commit is contained in:
parent
96e68c393f
commit
55572cff58
|
@ -1842,7 +1842,7 @@ getsave(char *field, bool *isdst)
|
|||
static void
|
||||
inrule(char **fields, int nfields)
|
||||
{
|
||||
struct rule r;
|
||||
struct rule r = { 0 };
|
||||
|
||||
if (nfields != RULE_FIELDS) {
|
||||
error(_("wrong number of fields on Rule line"));
|
||||
|
@ -1921,7 +1921,7 @@ inzsub(char **fields, int nfields, bool iscont)
|
|||
{
|
||||
register char * cp;
|
||||
char * cp1;
|
||||
struct zone z;
|
||||
struct zone z = { 0 };
|
||||
int format_len;
|
||||
register int i_stdoff, i_rule, i_format;
|
||||
register int i_untilyear, i_untilmonth;
|
||||
|
|
Loading…
Reference in a new issue