From dfbffff4b0c1795645073d40d07ded8e8f41ca9b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 26 Dec 2018 14:28:54 +0100 Subject: [PATCH] tweaks: remove a superfluous incrementing and decrementing of a variable --- src/text.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/text.c b/src/text.c index d13b7de6..867bb00b 100644 --- a/src/text.c +++ b/src/text.c @@ -2116,7 +2116,7 @@ void justify_paragraph(filestruct **firstline, size_t quote_len, justify_format(jusline, quote_len + indent_length(jusline->data + quote_len)); /* Now break this long line into pieces that each fit with wrap_at columns. */ - while (par_len > 0 && strlenpt(jusline->data) > wrap_at) { + while (strlenpt(jusline->data) > wrap_at) { size_t line_len = strlen(jusline->data); /* Find a point in the line where it can be broken. */ @@ -2138,8 +2138,6 @@ void justify_paragraph(filestruct **firstline, size_t quote_len, strncpy(jusline->next->data, lead_string, lead_len); strcpy(jusline->next->data + lead_len, jusline->data + break_pos); - par_len++; - /* When requested, snip all trailing blanks. */ if (ISSET(TRIM_BLANKS)) { while (break_pos > 0 && @@ -2152,7 +2150,6 @@ void justify_paragraph(filestruct **firstline, size_t quote_len, /* Go to the next line. */ jusline = jusline->next; - par_len--; } free(lead_string);