From: Andreas Fritiofson Date: Wed, 8 Jan 2014 15:56:30 +0000 (+0100) Subject: command: Fix formatting for empty usage string X-Git-Tag: v0.8.0-rc1~134 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4bff54ccf455fbdfd2bdf9aa371c79f267d486d9;p=openocd command: Fix formatting for empty usage string Introduced by requirement in 54d6330b. Change-Id: If3dba057127b54b15ca7f364f37c6286d34f77e0 Signed-off-by: Andreas Fritiofson Reported-by: Robert P. J. Day Reviewed-on: http://openocd.zylin.com/1858 Tested-by: jenkins Reviewed-by: Spencer Oliver --- diff --git a/src/helper/command.c b/src/helper/command.c index 85abe6bc..21362a61 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -868,7 +868,7 @@ static COMMAND_HELPER(command_help_show, struct command *c, unsigned n, free(cmd_name); if (is_match) { - if (c->usage) { + if (c->usage && strlen(c->usage) > 0) { LOG_USER_N(" "); command_help_show_wrap(c->usage, 0, n + 5); } else