From d22270e0ed291d3b08fd03a25181b279ca5e0911 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Tue, 10 Nov 2009 00:02:18 -0800 Subject: 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. --- src/flash/cfi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/flash/cfi.c') diff --git a/src/flash/cfi.c b/src/flash/cfi.c index 08c43580..88f57df2 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -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) { -- cgit v1.2.3