diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2012-01-27 16:44:06 +0000 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2012-02-06 10:41:23 +0000 |
commit | 250dc580561269737ca9a87ef92cb6aaa4570842 (patch) | |
tree | 732c99da9ed65973fccdb4b913a12efe07b9075a /src/hello.c | |
parent | dd4247dba502c23d727a20b0a27baf45444021e5 (diff) | |
download | riscv-openocd-250dc580561269737ca9a87ef92cb6aaa4570842.zip riscv-openocd-250dc580561269737ca9a87ef92cb6aaa4570842.tar.gz riscv-openocd-250dc580561269737ca9a87ef92cb6aaa4570842.tar.bz2 |
build: cleanup src/ directory
Change-Id: Ia6ed99ce75625ad6ef5e0d3c3bbdc1c1bec21df3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/407
Tested-by: jenkins
Diffstat (limited to 'src/hello.c')
-rw-r--r-- | src/hello.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/hello.c b/src/hello.c index 6584aa2..903123c 100644 --- a/src/hello.c +++ b/src/hello.c @@ -25,16 +25,13 @@ COMMAND_HANDLER(handle_foo_command) { if (CMD_ARGC < 1 || CMD_ARGC > 2) - { return ERROR_COMMAND_SYNTAX_ERROR; - } uint32_t address; COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], address); const char *msg = "<unchanged>"; - if (CMD_ARGC == 2) - { + if (CMD_ARGC == 2) { bool enable; COMMAND_PARSE_ENABLE(CMD_ARGV[1], enable); msg = enable ? "enable" : "disable"; @@ -49,7 +46,7 @@ static bool foo_flag; COMMAND_HANDLER(handle_flag_command) { return CALL_COMMAND_HANDLER(handle_command_parse_bool, - &foo_flag, "foo flag"); + &foo_flag, "foo flag"); } static const struct command_registration foo_command_handlers[] = { @@ -80,15 +77,11 @@ static const struct command_registration foo_command_handlers[] = { static COMMAND_HELPER(handle_hello_args, const char **sep, const char **name) { if (CMD_ARGC > 1) - { return ERROR_COMMAND_SYNTAX_ERROR; - } - if (1 == CMD_ARGC) - { + if (1 == CMD_ARGC) { *sep = " "; *name = CMD_ARGV[0]; - } - else + } else *sep = *name = ""; return ERROR_OK; |