[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:
Michael Brown
2010-06-15 17:33:23 +01:00
parent f4faa27dfd
commit 4bfd5b52c1
22 changed files with 59 additions and 14 deletions

View File

@@ -264,7 +264,7 @@ int create_downloader ( struct job_interface *job, struct image *image,
downloader = zalloc ( sizeof ( *downloader ) );
if ( ! downloader )
return -ENOMEM;
downloader->refcnt.free = downloader_free;
ref_init ( &downloader->refcnt, downloader_free );
job_init ( &downloader->job, &downloader_job_operations,
&downloader->refcnt );
xfer_init ( &downloader->xfer, &downloader_xfer_operations,