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.master
parent
5375403b9d
commit
aa2568858e
11
src/nano.c
11
src/nano.c
|
@ -178,16 +178,7 @@ void free_lines(linestruct *src)
|
||||||
/* Renumber the lines in a buffer, starting with the given line. */
|
/* Renumber the lines in a buffer, starting with the given line. */
|
||||||
void renumber(linestruct *line)
|
void renumber(linestruct *line)
|
||||||
{
|
{
|
||||||
ssize_t number;
|
ssize_t number = (line->prev == NULL) ? 0 : line->prev->lineno;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
while (line != NULL) {
|
while (line != NULL) {
|
||||||
line->lineno = ++number;
|
line->lineno = ++number;
|
||||||
|
|
Loading…
Reference in New Issue