mirror of
https://github.com/ipxe/ipxe
synced 2026-05-04 03:03:43 +03:00
[refcnt] Add ref_init() wrapper function
Standardise on using ref_init() to initialise an embedded reference count, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -224,6 +224,7 @@ static int tcp_open ( struct xfer_interface *xfer, struct sockaddr *peer,
|
||||
if ( ! tcp )
|
||||
return -ENOMEM;
|
||||
DBGC ( tcp, "TCP %p allocated\n", tcp );
|
||||
ref_init ( &tcp->refcnt, NULL );
|
||||
xfer_init ( &tcp->xfer, &tcp_xfer_operations, &tcp->refcnt );
|
||||
tcp->prev_tcp_state = TCP_CLOSED;
|
||||
tcp->tcp_state = TCP_STATE_SENT ( TCP_SYN );
|
||||
|
||||
Reference in New Issue
Block a user