From 3973c5f866deb015a89cb2ebd9c5f2c6c6c45370 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 31 Aug 2008 21:37:11 +0000 Subject: [PATCH] Minor cleanup. [r21600] --- main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index c643979..ae40622 100644 --- a/main.c +++ b/main.c @@ -824,23 +824,23 @@ int main(int argc, char **argv) filetype_t type = forced_filetype; const char *filename = arg; if (type == FILETYPE_AUTODETECT) { - size_t len = strlen(arg); + size_t const len = strlen(arg); if (len < 2 && arg[0] == '-') { /* - implicitly means C source file */ type = FILETYPE_C; filename = NULL; - } else if (len > 2 && arg[len-2] == '.') { - switch(arg[len-1]) { - case 'c': type = FILETYPE_C; break; - case 'h': type = FILETYPE_C; break; + } else if (len > 2 && arg[len - 2] == '.') { + switch (arg[len - 1]) { + case 'c': type = FILETYPE_C; break; + case 'h': type = FILETYPE_C; break; case 's': type = FILETYPE_PREPROCESSED_ASSEMBLER; break; - case 'S': type = FILETYPE_ASSEMBLER; break; + case 'S': type = FILETYPE_ASSEMBLER; break; case 'a': - case 'o': type = FILETYPE_OBJECT; break; + case 'o': type = FILETYPE_OBJECT; break; } - } else if (len > 3 && arg[len-3] == '.') { - if(strcmp(arg + len - 2, "so") == 0) { + } else if (len > 3 && arg[len - 3] == '.') { + if (strcmp(arg + len - 2, "so") == 0) { type = FILETYPE_OBJECT; } } -- 2.20.1