command_handler_t: make argc unsigned

The number of command arguments will always be 0 or more, so use
the right type in handlers.  This has a cascading effect up through
the layers, but the new COMMAND_HANDLER macros prevented total chaos.
This commit is contained in:
Zachary T Welch
2009-11-10 00:02:18 -08:00
parent a585bdf726
commit d22270e0ed
7 changed files with 12 additions and 18 deletions

View File

@@ -604,9 +604,6 @@ static int cfi_register_commands(struct command_context_s *cmd_ctx)
FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command)
{
cfi_flash_bank_t *cfi_info;
int i;
(void) cmd_ctx;
(void) cmd;
if (argc < 6)
{
@@ -635,7 +632,7 @@ FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command)
cfi_info->jedec_probe = 0;
cfi_info->not_cfi = 0;
for (i = 6; i < argc; i++)
for (unsigned i = 6; i < argc; i++)
{
if (strcmp(args[i], "x16_as_x8") == 0)
{