sbvarsign: Fix invalid sizeof() for zeroing timestamp data

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
Jeremy Kerr 2012-08-22 14:57:00 +08:00
parent 030d5ef321
commit feddcb4f4f

View file

@ -208,7 +208,7 @@ static int set_timestamp(EFI_TIME *timestamp)
/* copy to our EFI-specific time structure. Other fields (Nanosecond, /* copy to our EFI-specific time structure. Other fields (Nanosecond,
* TimeZone, Daylight and Pad) are defined to be zero */ * TimeZone, Daylight and Pad) are defined to be zero */
memset(timestamp, 0, sizeof(timestamp)); memset(timestamp, 0, sizeof(*timestamp));
timestamp->Year = tm->tm_year; timestamp->Year = tm->tm_year;
timestamp->Month = tm->tm_mon; timestamp->Month = tm->tm_mon;
timestamp->Day = tm->tm_mday; timestamp->Day = tm->tm_mday;