mirror of
https://github.com/ipxe/ipxe
synced 2026-01-06 20:21:47 +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:
@@ -491,7 +491,7 @@ static int ftp_open ( struct xfer_interface *xfer, struct uri *uri ) {
|
||||
ftp = zalloc ( sizeof ( *ftp ) );
|
||||
if ( ! ftp )
|
||||
return -ENOMEM;
|
||||
ftp->refcnt.free = ftp_free;
|
||||
ref_init ( &ftp->refcnt, ftp_free );
|
||||
xfer_init ( &ftp->xfer, &ftp_xfer_operations, &ftp->refcnt );
|
||||
ftp->uri = uri_get ( uri );
|
||||
xfer_init ( &ftp->control, &ftp_control_operations, &ftp->refcnt );
|
||||
|
||||
Reference in New Issue
Block a user