wdvi

network DVI viewer
Log | Files | Refs

commit 8c1e448e2e998d81d9e1bb1c44b6b13ea6694a85
parent 97f8596d4faba4d85958ffbb4811a42f266a12dd
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Sun, 12 Mar 2023 00:18:02 +0000

remove one layer of control flow from complicated loop

Diffstat:
Mdvi-init.c | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/dvi-init.c b/dvi-init.c @@ -589,10 +589,11 @@ read_postamble(long *last_page_offset, long numerator, long denominator) * free up fonts no longer in use */ fontpp = &font_head; - while ((fontp = *fontpp) != NULL) - if (fontp->flags & FONT_IN_USE) - fontpp = &fontp->next; - else { + while ((fontp = *fontpp) != NULL) { + if (fontp->flags & FONT_IN_USE) { + fontpp = &fontp->next; + continue; + } if (debug & DBG_PK) printf("Discarding font \"%s\" at %d dpi\n", fontp->fontname, (int) (fontp->fsize + 0.5)); @@ -664,7 +665,7 @@ read_postamble(long *last_page_offset, long numerator, long denominator) } free((char *) fontp); } - } + } return True; }