mc: Refix 861ffb4

This commit is contained in:
Alexander Amelkin 2018-07-20 14:23:14 +03:00
parent 861ffb4680
commit 2de8a5e1a9
No known key found for this signature in database
GPG Key ID: E893587B5B74178D

View File

@ -531,7 +531,7 @@ ipmi_mc_print_guid(struct ipmi_guid_t guid)
char tbuf[40]; char tbuf[40];
time_t s; time_t s;
memset(tbuf, 0, 40); memset(tbuf, 0, 40);
struct tm *strtm; struct tm *tm;
/* Kipp - changed order of last field (node) to follow specification */ /* Kipp - changed order of last field (node) to follow specification */
printf("System GUID : %08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x\n", printf("System GUID : %08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x\n",
@ -542,10 +542,10 @@ ipmi_mc_print_guid(struct ipmi_guid_t guid)
s = (time_t)guid.time_low; /* Kipp - removed the BSWAP_32, it was not needed here */ s = (time_t)guid.time_low; /* Kipp - removed the BSWAP_32, it was not needed here */
if(time_in_utc) if(time_in_utc)
strtm = gmtime(&s); tm = gmtime(&s);
else else
strtm = localtime(&s); tm = localtime(&s);
strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&s)); strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", tm);
printf("Timestamp : %s\n", tbuf); printf("Timestamp : %s\n", tbuf);
return 0; return 0;
} }