From 032f2940aa63d82a2249400bdfc8c611154370c1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 20 May 2020 07:39:21 +0200 Subject: ghwlib: never display the NO_SIG terminator. --- src/grt/ghwlib.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/grt') diff --git a/src/grt/ghwlib.c b/src/grt/ghwlib.c index 8d1fd8ddf..482cc3386 100644 --- a/src/grt/ghwlib.c +++ b/src/grt/ghwlib.c @@ -1313,8 +1313,8 @@ ghw_disp_hie (struct ghw_handler *h, struct ghw_hie *top) ghw_disp_subtype_indication (h, hie->u.sig.type); printf (":"); k = 0; - - while (1) + /* There can be 0-length signals. */ + while (sigs[k] != GHW_NO_SIG) { /* First signal of the range. */ printf (" #%u", sigs[k]); @@ -1324,9 +1324,6 @@ ghw_disp_hie (struct ghw_handler *h, struct ghw_hie *top) if (num > 1) printf ("-#%u", sigs[k + num - 1]); k += num; - /* End of signals ? */ - if (sigs[k] == GHW_NO_SIG) - break; } n = hie->brother; } -- cgit v1.2.3