server/telnet: simplify telnet_input function
running complexity on this file tells that:
NOTE: proc telnet_input in file telnet_server.c line 576
nesting depth reached level 8
==> *seriously consider rewriting the procedure*.
Complexity Scores
Score | ln-ct | nc-lns| file-name(line): proc-name
319 272 226 src/server/telnet_server.c(576): telnet_input
total nc-lns 226
so try to reduce the complexity score of telnet_input function
Change-Id: I64ecb0c54da83c27a343f2a1df99fc8f9484572a
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6440
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>