commit aa2568858e5583c6f66b04b53aa4fa86901c4fec
parent 5375403b9d3c49752553b3de1e3adc886e2af411
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 3 Apr 2019 15:11:18 +0200
tweaks: remove a superfluous check for NULL plus the associated message
The message has been there for a year and no one ever reported seeing it.
Diffstat:
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -178,16 +178,7 @@ void free_lines(linestruct *src)
/* Renumber the lines in a buffer, starting with the given line. */
void renumber(linestruct *line)
{
- ssize_t number;
-
- if (line == NULL) {
-#ifndef NANO_TINY
- statusline(ALERT, "Trying to renumber nothing -- please report a bug");
-#endif
- return;
- }
-
- number = (line->prev == NULL) ? 0 : line->prev->lineno;
+ ssize_t number = (line->prev == NULL) ? 0 : line->prev->lineno;
while (line != NULL) {
line->lineno = ++number;