You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/04/08 06:32:13 UTC
(nuttx-apps) branch master updated: testing/monkey: fix unsigned zero comparison
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 92d922a10 testing/monkey: fix unsigned zero comparison
92d922a10 is described below
commit 92d922a1089e8dc4bdfaf98622f944c10bab4206
Author: pengyiqiang <pe...@xiaomi.com>
AuthorDate: Mon Apr 8 10:24:08 2024 +0800
testing/monkey: fix unsigned zero comparison
Signed-off-by: pengyiqiang <pe...@xiaomi.com>
---
testing/monkey/monkey_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/testing/monkey/monkey_main.c b/testing/monkey/monkey_main.c
index a40f918f4..21ae1b010 100644
--- a/testing/monkey/monkey_main.c
+++ b/testing/monkey/monkey_main.c
@@ -130,8 +130,8 @@ struct monkey_param_s
int ver_res;
int period_min;
int period_max;
- uint8_t btn_bit;
- uint8_t log_level;
+ int btn_bit;
+ int log_level;
struct monkey_event_config_s event[MONKEY_EVENT_LAST];
};
@@ -425,12 +425,12 @@ static void parse_commandline(int argc, FAR char **argv,
break;
case 'b':
- OPTARG_TO_VALUE(param->btn_bit, uint8_t, 10);
+ OPTARG_TO_VALUE(param->btn_bit, int, 10);
param->btn_bit = CONSTRAIN(param->btn_bit, 0, 31);
break;
case 'l':
- OPTARG_TO_VALUE(param->log_level, uint8_t, 10);
+ OPTARG_TO_VALUE(param->log_level, int, 10);
param->log_level = CONSTRAIN(param->log_level, 0,
MONKEY_LOG_LEVEL_LAST - 1);
break;