]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tipc: Prevent display of name table types with no publications
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 5 Jun 2008 00:37:59 +0000 (17:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Jun 2008 00:37:59 +0000 (17:37 -0700)
This patch adds a check to prevent TIPC's name table display code
from listing a name type entry if it exists only to hold subscription
info, rather than published names.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/name_table.c

index 892373e498e4865026b50fb9830ca51d7a7584fb..4455f13cfaf68f632e48b42db877b42a704216dd 100644 (file)
@@ -905,6 +905,9 @@ static void nameseq_list(struct name_seq *seq, struct print_buf *buf, u32 depth,
        struct sub_seq *sseq;
        char typearea[11];
 
+       if (seq->first_free == 0)
+               return;
+
        sprintf(typearea, "%-10u", seq->type);
 
        if (depth == 1) {