From b4a5fac744cac7f8da2f97d26a23a31d0502dcce Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 14 Oct 2019 19:19:53 +0200 Subject: [PATCH] tweaks: use a literal NULL instead of a variable that is NULL Now all calls of mallocstrncpy() have NULL as the first parameter (apart from one call in utils.c, but that can be changed), so the function can be simplified. --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index f9fd030b..bc0171ea 100644 --- a/src/text.c +++ b/src/text.c @@ -1984,7 +1984,7 @@ void do_justify(bool full_justify) /* Copy the leading part that is to be used for the new paragraph. */ quote_len = quote_length(first_par_line->data); lead_len = quote_len + indent_length(first_par_line->data + quote_len); - the_lead = mallocstrncpy(the_lead, first_par_line->data, lead_len + 1); + the_lead = mallocstrncpy(NULL, first_par_line->data, lead_len + 1); the_lead[lead_len] = '\0'; /* Copy the leading part that is to be used for the new paragraph after