From 3bc0138f55f887aaf0fe7f375582993a33a32119 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 10 Oct 2021 14:06:55 -0700 Subject: [PATCH] user_init: use a C99 bool for 'saw_bb' --- lib/common/psusershape.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/common/psusershape.c b/lib/common/psusershape.c index 9bff9459c..127ce1dad 100644 --- a/lib/common/psusershape.c +++ b/lib/common/psusershape.c @@ -45,7 +45,7 @@ static usershape_t *user_init(const char *str) char line[BUFSIZ]; FILE *fp; struct stat statbuf; - int saw_bb, must_inline, rc; + int must_inline, rc; int lx, ly, ux, uy; usershape_t *us; @@ -61,11 +61,12 @@ static usershape_t *user_init(const char *str) return NULL; } /* try to find size */ - saw_bb = must_inline = FALSE; + bool saw_bb = false; + must_inline = FALSE; while (fgets(line, sizeof(line), fp)) { if (sscanf (line, "%%%%BoundingBox: %d %d %d %d", &lx, &ly, &ux, &uy) == 4) { - saw_bb = TRUE; + saw_bb = true; } if ((line[0] != '%') && strstr(line,"read")) must_inline = TRUE; if (saw_bb && must_inline) break; -- 2.40.0