wdvi

network DVI viewer
Log | Files | Refs

commit 6569653f436cb40a747480f37f6e8a8c5b795707
parent a7336e6bef9087be1174227226b57b73aa36e470
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Thu,  9 Mar 2023 03:51:11 +0000

cleanup open_font_file()

- ansi function signature
- early return

Diffstat:
Mdvi-draw.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dvi-draw.c b/dvi-draw.c @@ -503,14 +503,14 @@ change_font(unsigned long n) */ void -open_font_file(fontp) - struct font *fontp; +open_font_file(struct font *fontp) { - if (fontp->file == NULL) { - fontp->file = xfopen(fontp->filename, "r"); - if (fontp->file == NULL) + if (fontp->file != NULL) + return; + + fontp->file = xfopen(fontp->filename, "r"); + if (fontp->file == NULL) errx(1, "Font file disappeared: '%s'", fontp->filename); - } } /*