aboutsummaryrefslogtreecommitdiff
path: root/src/net/udp/dhcp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-06-15 17:33:23 +0100
committerMichael Brown <mcb30@ipxe.org>2010-06-22 14:26:40 +0100
commit4bfd5b52c1fae75eb0449af626ec69543f9334fa (patch)
tree297bc75308e763df909fb0733c0ca2ac109ebcbc /src/net/udp/dhcp.c
parentf4faa27dfd40a2b5af5b9a8e3b0acee3d05c751a (diff)
downloadipxe-4bfd5b52c1fae75eb0449af626ec69543f9334fa.zip
ipxe-4bfd5b52c1fae75eb0449af626ec69543f9334fa.tar.gz
ipxe-4bfd5b52c1fae75eb0449af626ec69543f9334fa.tar.bz2
[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>
Diffstat (limited to 'src/net/udp/dhcp.c')
-rw-r--r--src/net/udp/dhcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 31e420c..33212b0 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -1439,7 +1439,7 @@ int start_dhcp ( struct job_interface *job, struct net_device *netdev ) {
dhcp = zalloc ( sizeof ( *dhcp ) );
if ( ! dhcp )
return -ENOMEM;
- dhcp->refcnt.free = dhcp_free;
+ ref_init ( &dhcp->refcnt, dhcp_free );
job_init ( &dhcp->job, &dhcp_job_operations, &dhcp->refcnt );
xfer_init ( &dhcp->xfer, &dhcp_xfer_operations, &dhcp->refcnt );
dhcp->netdev = netdev_get ( netdev );
@@ -1542,7 +1542,7 @@ int start_pxebs ( struct job_interface *job, struct net_device *netdev,
sizeof ( *ip ) /* terminator */ );
if ( ! dhcp )
return -ENOMEM;
- dhcp->refcnt.free = dhcp_free;
+ ref_init ( &dhcp->refcnt, dhcp_free );
job_init ( &dhcp->job, &dhcp_job_operations, &dhcp->refcnt );
xfer_init ( &dhcp->xfer, &dhcp_xfer_operations, &dhcp->refcnt );
dhcp->netdev = netdev_get ( netdev );