From 2de8a5e1a9441ad1300aa485b00f37b1c06f56ac Mon Sep 17 00:00:00 2001 From: Alexander Amelkin Date: Fri, 20 Jul 2018 14:23:14 +0300 Subject: [PATCH] mc: Refix 861ffb4 --- lib/ipmi_mc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ipmi_mc.c b/lib/ipmi_mc.c index 1875dd8..4167b1a 100644 --- a/lib/ipmi_mc.c +++ b/lib/ipmi_mc.c @@ -531,7 +531,7 @@ ipmi_mc_print_guid(struct ipmi_guid_t guid) char tbuf[40]; time_t s; memset(tbuf, 0, 40); - struct tm *strtm; + struct tm *tm; /* Kipp - changed order of last field (node) to follow specification */ 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 */ if(time_in_utc) - strtm = gmtime(&s); + tm = gmtime(&s); else - strtm = localtime(&s); - strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&s)); + tm = localtime(&s); + strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", tm); printf("Timestamp : %s\n", tbuf); return 0; }