tweaks: reshuffle two lines, to do the linking first, then the content
parent
a197ccf12d
commit
a692b01c04
|
@ -83,14 +83,13 @@ linestruct *make_new_node(linestruct *prevnode)
|
||||||
{
|
{
|
||||||
linestruct *newnode = nmalloc(sizeof(linestruct));
|
linestruct *newnode = nmalloc(sizeof(linestruct));
|
||||||
|
|
||||||
newnode->data = NULL;
|
|
||||||
newnode->prev = prevnode;
|
newnode->prev = prevnode;
|
||||||
newnode->next = NULL;
|
newnode->next = NULL;
|
||||||
newnode->lineno = (prevnode != NULL) ? prevnode->lineno + 1 : 1;
|
newnode->data = NULL;
|
||||||
|
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
newnode->multidata = NULL;
|
newnode->multidata = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
newnode->lineno = (prevnode) ? prevnode->lineno + 1 : 1;
|
||||||
|
|
||||||
return newnode;
|
return newnode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue