aboutsummaryrefslogtreecommitdiff
path: root/src/svf
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2016-05-22 04:34:04 +0200
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-07-19 10:45:16 +0100
commitf19ac83152b54a204b8148815a538d868973e1e1 (patch)
tree381a04c00bd20dd508d6020f869ea3dd160de933 /src/svf
parentf4496b25e3040e29b9bc78dd5bf8ac8128c09a1e (diff)
Fix usage of timeval_ms()
First, fix the timeval_ms() implementation to not have K&R but ANSI argument semantics by adding a missing void. timeval_ms() returns an int64_t, not uint64_t or long long. Consistently use int64_t for variables and PRI*64 as format string. While at it, change a few related variables to bool for clarity. Note that timeval_ms() may return a negative error code, but not a single caller checks for that. Change-Id: I27cf83e75b3e9a8913f6c43e98a281bea77aac13 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3499 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/svf')
-rw-r--r--src/svf/svf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c
index 5f95b0c6..e7e815c1 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -361,7 +361,7 @@ COMMAND_HANDLER(handle_svf_command)
#define SVF_MAX_NUM_OF_OPTIONS 5
int command_num = 0;
int ret = ERROR_OK;
- long long time_measure_ms;
+ int64_t time_measure_ms;
int time_measure_s, time_measure_m;
/* use NULL to indicate a "plain" svf file which accounts for
@@ -535,7 +535,7 @@ COMMAND_HANDLER(handle_svf_command)
time_measure_s %= 60;
if (time_measure_ms < 1000)
command_print(CMD_CTX,
- "\r\nTime used: %dm%ds%lldms ",
+ "\r\nTime used: %dm%ds%" PRId64 "ms ",
time_measure_m,
time_measure_s,
time_measure_ms);