aboutsummaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-01-08 16:56:30 +0100
committerSpencer Oliver <spen@spen-soft.co.uk>2014-01-09 13:21:51 +0000
commit4bff54ccf455fbdfd2bdf9aa371c79f267d486d9 (patch)
tree0df12982ad1699902847828cf8dc926979f57ad4 /src/helper
parent416e79e24a7baf0541955799297a00b76c1fe002 (diff)
downloadriscv-openocd-4bff54ccf455fbdfd2bdf9aa371c79f267d486d9.zip
riscv-openocd-4bff54ccf455fbdfd2bdf9aa371c79f267d486d9.tar.gz
riscv-openocd-4bff54ccf455fbdfd2bdf9aa371c79f267d486d9.tar.bz2
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>
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 85abe6b..21362a6 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