From: Matt Fleming Date: Thu, 28 Feb 2013 15:07:19 +0000 (+0000) Subject: readconfig: Don't display "(null)" labels when hitting TAB X-Git-Tag: syslinux-5.10-pre2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=557ad5544fbaa893936d31e44038c3570030a798;p=platform%2Fupstream%2Fsyslinux.git readconfig: Don't display "(null)" labels when hitting TAB It is entirely legitimate for a menu entry to have a NULL label or displayname. Since these entries are not used for execution, skip displaying them in print_labels() when hitting the TAB key. Reported-by: Bernd Blaauw Signed-off-by: Matt Fleming --- diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 036a1df..9d50c2f 100644 --- a/com32/elflink/ldlinux/readconfig.c +++ b/com32/elflink/ldlinux/readconfig.c @@ -473,6 +473,9 @@ void print_labels(const char *prefix, size_t len) printf("\n"); for (me = all_entries; me; me = me->next ) { + if (!me->label) + continue; + if (!strncmp(prefix, me->label, len)) printf(" %s", me->label); }