diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-07-10 11:46:10 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-07-30 14:43:39 +0200 |
commit | 4fcc44628ece73277714521f2fc042d126c20e7d (patch) | |
tree | 6ee5d5d490dad3fa36eadbca5a997dc244a51034 | |
parent | bbf766fdcf397d97171aa0be3101a9c553b53d29 (diff) |
idlestat: fix -t with negative values
Currently using a negative -t value will run forever because duration
is an unsigned int and the check to see if it is negative is always
true because an unsigned int can never be negative. Make duration
a signed int to fix this.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | idlestat.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -132,7 +132,7 @@ struct trace_buffer_settings { struct program_options { int mode; int display; - unsigned int duration; + int duration; struct trace_buffer_settings tbs; char *filename; char *baseline_filename; |