helper/command: remove dead code in command_unknown() 96/5096/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 7 Apr 2019 10:18:05 +0000 (12:18 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 23 May 2019 21:13:09 +0000 (22:13 +0100)
commitf912649968c2333a7a1d19aa7106e900b3d8527a
tree95ca2eac97a6c740137bbe27324b0ee7321e9e6f
parent5fbf4d4cc3f67ec8b2fb3d8a789117583a84e1a1
helper/command: remove dead code in command_unknown()

Commit 89fa493a3bc34d22eeca06fa4e78523ac3b766a8 removes the top
level command "unknown" and adds in command_unknown() some unclear
code that should detect a user-implemented "unknown" command.
But, all the commands that trigger the execution of the function
command_unknown() are registered in register_command_handler() and
have the command name prefixed with "ocd_".
Due to such "ocd_" prefix in cmd_name, the condition
if (strcmp(cmd_name, "unknown") == 0) { ... }
is always false.
Nobody complained for almost 10 years so we can proceed to remove
this dead code, before merging any change that obsoletes the
prefix "ocd_" and potentially makes the condition true.

Remove the dead code guarded by the condition above.

Change-Id: Icf11a956bb2d68fc84e6eb5779edf8e35db8fa53
Fixes: 89fa493a3bc3 ("remove unknown handler")
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5096
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/helper/command.c

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)