mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +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:
@@ -64,7 +64,7 @@ struct image * alloc_image ( void ) {
|
||||
|
||||
image = zalloc ( sizeof ( *image ) );
|
||||
if ( image ) {
|
||||
image->refcnt.free = free_image;
|
||||
ref_init ( &image->refcnt, free_image );
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user