command: Fix formatting for empty usage string

Introduced by requirement in 54d6330b.

Change-Id: If3dba057127b54b15ca7f364f37c6286d34f77e0
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1858
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
__archive__
Andreas Fritiofson 2014-01-08 16:56:30 +01:00 committed by Spencer Oliver
parent 416e79e24a
commit 4bff54ccf4
1 changed files with 1 additions and 1 deletions

View File

@ -868,7 +868,7 @@ static COMMAND_HELPER(command_help_show, struct command *c, unsigned n,
free(cmd_name); free(cmd_name);
if (is_match) { if (is_match) {
if (c->usage) { if (c->usage && strlen(c->usage) > 0) {
LOG_USER_N(" "); LOG_USER_N(" ");
command_help_show_wrap(c->usage, 0, n + 5); command_help_show_wrap(c->usage, 0, n + 5);
} else } else