On Thursday 10 January 2008 03:12:27 Sebastien Dugue wrote:
> Remove unused avg variable in gtod_latency.
>
> Signed-off-by: Sebastien Dugue <[EMAIL PROTECTED]>
Acked-by: Darren Hart <[EMAIL PROTECTED]>
> Cc: Darren Hart <[EMAIL PROTECTED]>
> Cc: Tim Chavez <[EMAIL PROTECTED]>
> ---
> .../realtime/func/gtod_latency/gtod_latency.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/realtime/func/gtod_latency/gtod_latency.c
> b/testcases/realtime/func/gtod_latency/gtod_latency.c index
> 777f66d..d0b78b3 100644
> --- a/testcases/realtime/func/gtod_latency/gtod_latency.c
> +++ b/testcases/realtime/func/gtod_latency/gtod_latency.c
> @@ -219,7 +219,7 @@ int main(int argc, char *argv[])
> int i, err;
> struct timeval tv_a, tv_b;
> unsigned long long delta;
> - unsigned long long max, min, avg;
> + unsigned long long max, min;
> struct sched_param param;
> stats_container_t dat;
> stats_container_t hist;
> @@ -256,7 +256,7 @@ int main(int argc, char *argv[])
> printf("Iterations: %d\n\n", ITERATIONS);
>
> /* collect ITERATIONS pairs of gtod calls */
> - max = min = avg = 0;
> + max = min = 0;
> if (latency_threshold) {
> latency_trace_enable();
> latency_trace_start();
> @@ -269,7 +269,6 @@ int main(int argc, char *argv[])
> dat.records[i].y = delta;
> if (i == 0 || delta < min) min = delta;
> if (delta > max) max = delta;
> - avg += delta;
> if (latency_threshold && delta > latency_threshold)
> break;
> }
> @@ -288,7 +287,6 @@ int main(int argc, char *argv[])
> labels[SCATTER_LABELX], labels[SCATTER_LABELY],
> &dat,
> "points"); stats_container_save(filenames[HIST_FILENAME],
> titles[HIST_TITLE], labels[HIST_LABELX], labels[HIST_LABELY], &hist,
> "steps"); - avg /= i + 1;
>
> /* report on deltas */
> printf("Min: %llu us\n", min);
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list