previous discussion on this issue:

    http://marc.info/?l=ltp-list&m=129585256906986&w=2

This patch uses uint64_t to make -I option accept larger numbers to
get rid of overflow.

Signed-off-by: Caspar Zhang <cas...@casparzhang.com>
---
 lib/parse_opts.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/parse_opts.c b/lib/parse_opts.c
index fd49cfa..2159d22 100644
--- a/lib/parse_opts.c
+++ b/lib/parse_opts.c
@@ -708,7 +708,7 @@ static int get_current_time()
 int usc_test_looping(int counter)
 {
     static int first_time = 1;
-    static int stop_time = 0;	/* stop time in rtc or usecs */
+    static uint64_t stop_time;	/* stop time in rtc or usecs */
     static int delay;		/* delay in clocks or usecs  */
     int hertz = 0;		/* clocks per second or usecs per second */
     int ct, end;		/* current time, end delay time */
@@ -733,7 +733,7 @@ int usc_test_looping(int counter)
 
 	if (STD_LOOP_DURATION) {
 	    ct=get_current_time();
-	    stop_time = (int)((float)hertz * STD_LOOP_DURATION) + ct;
+	    stop_time = (uint64_t)((float)hertz * STD_LOOP_DURATION) + ct;
 	}
 
 	/*
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to