From 0133d5cba80bbc52b553439c4d8bbd3a8719fdf9 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 2 Dec 2017 18:05:52 +0100 Subject: [PATCH] tweaks: elide two variables that are used just once --- src/text.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/text.c b/src/text.c index a9e4fdaf..cf026ed3 100644 --- a/src/text.c +++ b/src/text.c @@ -1549,10 +1549,6 @@ bool do_wrap(filestruct *line) /* The text after the wrap point. */ size_t rest_length; /* The length of the remainder. */ - const char *next_line = NULL; - /* The next line, minus indentation. */ - size_t next_line_len = 0; - /* The length of next_line. */ size_t old_x = openfile->current_x; filestruct * old_line = openfile->current; @@ -1633,10 +1629,7 @@ bool do_wrap(filestruct *line) #endif } - next_line = line->next->data; - next_line_len = strlen(next_line); - - if (rest_length + next_line_len <= fill) { + if (rest_length + strlen(line->next->data) <= fill) { /* Delete the LF to join the two lines. */ do_delete(); /* Delete any leading blanks from the joined-on line. */