aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/grt/ghwlib.c7
1 files changed, 2 insertions, 5 deletions
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;
}