Skip to content

Commit

Permalink
pmconfig:fix coverity scan issue which is unsigned_compare
Browse files Browse the repository at this point in the history
Signed-off-by: dulibo1 <[email protected]>
  • Loading branch information
dulibo1 authored and xiaoxiang781216 committed Sep 30, 2024
1 parent 23dd233 commit b20f023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nshlib/nsh_syscmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
if (argc == 4)
{
ctrl.domain = atoi(argv[3]);
if (ctrl.domain < 0 || ctrl.domain >= CONFIG_PM_NDOMAINS)
if (ctrl.domain >= CONFIG_PM_NDOMAINS)
{
nsh_error(vtbl, g_fmtargrange, argv[3]);
return ERROR;
Expand Down

0 comments on commit b20f023

Please sign in to comment.