mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 04:52:47 -05:00
Correct code to insert into a doubly-linked list.
[originally from svn r2553]
This commit is contained in:
@ -504,7 +504,8 @@ Socket mactcp_new(SockAddr addr, int port, int privport, int oobinline,
|
||||
/* Add this to the list of all sockets */
|
||||
ret->next = mactcp.socklist;
|
||||
ret->prev = &mactcp.socklist;
|
||||
ret->next->prev = &ret->next;
|
||||
if (ret->next != NULL)
|
||||
ret->next->prev = &ret->next;
|
||||
mactcp.socklist = ret;
|
||||
|
||||
return (Socket)ret;
|
||||
|
Reference in New Issue
Block a user