[coreboot-gerrit] Change in coreboot[master]: cbfscomptool: fix display of time_t

Mike Frysinger (Code Review) gerrit at coreboot.org
Thu May 25 04:29:54 CEST 2017


Hello Patrick Georgi,

I'd like you to do a code review.  Please visit

    https://review.coreboot.org/19902

to review the following change.


Change subject: cbfscomptool: fix display of time_t
......................................................................

cbfscomptool: fix display of time_t

Not all systems have sizeof(time_t) == sizeof(long), so
cast the delta here to a long to match the %ld format.

Change-Id: If235577fc35454ddb15043c5a543f614b6f16a9e
---
M util/cbfstool/cbfscomptool.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/19902/1

diff --git a/util/cbfstool/cbfscomptool.c b/util/cbfstool/cbfscomptool.c
index 3430809..1021bc8 100644
--- a/util/cbfstool/cbfscomptool.c
+++ b/util/cbfstool/cbfscomptool.c
@@ -81,7 +81,7 @@
 		clock_gettime(CLOCK_MONOTONIC, &t_e);
 		printf("compressing %d bytes to %d took %ld seconds\n",
 			bufsize, outsize,
-			t_e.tv_sec - t_s.tv_sec);
+			(long)(t_e.tv_sec - t_s.tv_sec));
 	}
 	free(data);
 	free(compressed_data);

-- 
To view, visit https://review.coreboot.org/19902
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If235577fc35454ddb15043c5a543f614b6f16a9e
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vapier at chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>



More information about the coreboot-gerrit mailing list