remove unnecessary `closed` variable in parse_list

This local variable was initialized to `false` and never set to true
anywhere in the function.
master
Zandr Martin 6 years ago committed by Drew DeVault
parent 62a6d89da0
commit 053c7705f3
  1. 10
      src/main.c

@ -333,7 +333,6 @@ static void parse_list(struct parser *p, int *indent, int num) {
} }
list_header(p, &num); list_header(p, &num);
parse_text(p); parse_text(p);
bool closed = false;
do { do {
parse_indent(p, indent, true); parse_indent(p, indent, true);
if ((ch = parser_getch(p)) == UTF8_INVALID) { if ((ch = parser_getch(p)) == UTF8_INVALID) {
@ -351,12 +350,9 @@ static void parse_list(struct parser *p, int *indent, int num) {
if ((ch = parser_getch(p)) != ' ') { if ((ch = parser_getch(p)) != ' ') {
parser_fatal(p, "Expected space before start of list entry"); 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); list_header(p, &num);
parse_text(p); parse_text(p);
closed = false;
break; break;
default: default:
fprintf(p->output, "\n"); fprintf(p->output, "\n");
@ -365,9 +361,7 @@ static void parse_list(struct parser *p, int *indent, int num) {
} }
} while (ch != UTF8_INVALID); } while (ch != UTF8_INVALID);
ret: ret:
if (!closed) { roff_macro(p, "RE", NULL);
roff_macro(p, "RE", NULL);
}
} }
static void parse_literal(struct parser *p, int *indent) { static void parse_literal(struct parser *p, int *indent) {

Loading…
Cancel
Save