mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +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:
@@ -59,6 +59,7 @@ static int hw_open ( struct xfer_interface *xfer, struct uri *uri __unused ) {
|
||||
hw = zalloc ( sizeof ( *hw ) );
|
||||
if ( ! hw )
|
||||
return -ENOMEM;
|
||||
ref_init ( &hw->refcnt, NULL );
|
||||
xfer_init ( &hw->xfer, &hw_xfer_operations, &hw->refcnt );
|
||||
process_init ( &hw->process, hw_step, &hw->refcnt );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user