From 053c7705f337927c242290eeae6262ab597c999b Mon Sep 17 00:00:00 2001 From: Zandr Martin Date: Sun, 04 Aug 2019 08:43:56 -0400 Subject: [PATCH] remove unnecessary `closed` variable in parse_list This local variable was initialized to `false` and never set to true anywhere in the function. --- src/main.c | 10 ++-------- diff --git a/src/main.c b/src/main.c index f8dfe077e5b62d68b048f8119e007fae7dd6b2b9..72b7eaff0eb5dc5fd67847745627e1d7cb3c506a 100644 --- a/src/main.c +++ b/src/main.c @@ -333,7 +333,6 @@ parser_fatal(p, "Expected space before start of list entry"); } list_header(p, &num); parse_text(p); - bool closed = false; do { parse_indent(p, indent, true); if ((ch = parser_getch(p)) == UTF8_INVALID) { @@ -351,12 +350,9 @@ case '.': if ((ch = parser_getch(p)) != ' ') { parser_fatal(p, "Expected space before start of list entry"); } - if (!closed) { - roff_macro(p, "RE", NULL); - } + roff_macro(p, "RE", NULL); list_header(p, &num); parse_text(p); - closed = false; break; default: fprintf(p->output, "\n"); @@ -365,9 +361,7 @@ goto ret; } } while (ch != UTF8_INVALID); ret: - if (!closed) { - roff_macro(p, "RE", NULL); - } + roff_macro(p, "RE", NULL); } static void parse_literal(struct parser *p, int *indent) { -- 2.48.1