tweaks: reshuffle two lines, to do the linking first, then the content

master
Benno Schulenberg 2020-01-29 12:31:52 +01:00
parent a197ccf12d
commit a692b01c04
1 changed files with 2 additions and 3 deletions

View File

@ -83,14 +83,13 @@ linestruct *make_new_node(linestruct *prevnode)
{
linestruct *newnode = nmalloc(sizeof(linestruct));
newnode->data = NULL;
newnode->prev = prevnode;
newnode->next = NULL;
newnode->lineno = (prevnode != NULL) ? prevnode->lineno + 1 : 1;
newnode->data = NULL;
#ifdef ENABLE_COLOR
newnode->multidata = NULL;
#endif
newnode->lineno = (prevnode) ? prevnode->lineno + 1 : 1;
return newnode;
}