From 5ab5ce90823bea9b64009f6f9f9765edc5e4a70f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 16 Jan 2022 11:57:53 -0800 Subject: [PATCH] scan_num: use a C99 bool for 'saw_digit' --- cmd/lefty/dot2l/dotlex.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/lefty/dot2l/dotlex.c b/cmd/lefty/dot2l/dotlex.c index 0fe70683c..8028a1fe2 100644 --- a/cmd/lefty/dot2l/dotlex.c +++ b/cmd/lefty/dot2l/dotlex.c @@ -16,6 +16,7 @@ typedef void *Tobj; #include "dot2l.h" #include "leftyio.h" #include "triefa.c" +#include #include static int syntax_errors; @@ -255,7 +256,7 @@ static char *scan_token (char *p) { static char *scan_num (char *p) { char *q, *z; int saw_rp = FALSE; - int saw_digit = FALSE; + bool saw_digit = false; z = p; q = lexbuf; @@ -266,13 +267,13 @@ static char *scan_num (char *p) { *q++ = *z++; } while (isdigit (*z)) { - saw_digit = TRUE; + saw_digit = true; *q++ = *z++; } if (*z == '.' && !saw_rp) { *q++ = *z++; while (isdigit (*z)) { - saw_digit = TRUE; + saw_digit = true; *q++ = *z++; } } -- 2.40.0