[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:
@@ -110,6 +110,7 @@ static int udp_open_common ( struct xfer_interface *xfer,
|
||||
if ( ! udp )
|
||||
return -ENOMEM;
|
||||
DBGC ( udp, "UDP %p allocated\n", udp );
|
||||
ref_init ( &udp->refcnt, NULL );
|
||||
xfer_init ( &udp->xfer, &udp_xfer_operations, &udp->refcnt );
|
||||
if ( st_peer )
|
||||
memcpy ( &udp->peer, st_peer, sizeof ( udp->peer ) );
|
||||
|
||||
Reference in New Issue
Block a user