[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:
+1
-1
@@ -748,7 +748,7 @@ static int slam_open ( struct xfer_interface *xfer, struct uri *uri ) {
|
||||
slam = zalloc ( sizeof ( *slam ) );
|
||||
if ( ! slam )
|
||||
return -ENOMEM;
|
||||
slam->refcnt.free = slam_free;
|
||||
ref_init ( &slam->refcnt, slam_free );
|
||||
xfer_init ( &slam->xfer, &slam_xfer_operations, &slam->refcnt );
|
||||
xfer_init ( &slam->socket, &slam_socket_operations, &slam->refcnt );
|
||||
xfer_init ( &slam->mc_socket, &slam_mc_socket_operations,
|
||||
|
||||
Reference in New Issue
Block a user