From ddebb6342591bcc8c8b4643ce297e3cfcb0540dc Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 31 Jul 2012 20:38:37 +0200 Subject: [PATCH] lexical #2/19, rewrite the `else if' --- src/frontend/parser/lexical.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/frontend/parser/lexical.c b/src/frontend/parser/lexical.c index af94d465d..224949695 100644 --- a/src/frontend/parser/lexical.c +++ b/src/frontend/parser/lexical.c @@ -185,11 +185,13 @@ gotchar: if (i) { buf[i] = '\0'; cw->wl_word = copy(buf); - } else if (cw->wl_prev) { - cw->wl_prev->wl_next = NULL; - tfree(cw); - } else { - cw->wl_word = NULL; + } else { + if (cw->wl_prev) { + cw->wl_prev->wl_next = NULL; + tfree(cw); + } else { + cw->wl_word = NULL; + } } goto done;