diff options
| author | Michael Brown | 2010-06-15 18:33:23 +0200 |
|---|---|---|
| committer | Michael Brown | 2010-06-22 15:26:40 +0200 |
| commit | 4bfd5b52c1fae75eb0449af626ec69543f9334fa (patch) | |
| tree | 297bc75308e763df909fb0733c0ca2ac109ebcbc /src/net/tcp | |
| parent | [pcnet32] Replace pcnet32 with native driver (diff) | |
| download | ipxe-4bfd5b52c1fae75eb0449af626ec69543f9334fa.tar.gz ipxe-4bfd5b52c1fae75eb0449af626ec69543f9334fa.tar.xz ipxe-4bfd5b52c1fae75eb0449af626ec69543f9334fa.zip | |
[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/tcp')
| -rw-r--r-- | src/net/tcp/ftp.c | 2 | ||||
| -rw-r--r-- | src/net/tcp/http.c | 2 | ||||
| -rw-r--r-- | src/net/tcp/iscsi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c index 3ef71b610..58794c8b2 100644 --- a/src/net/tcp/ftp.c +++ b/src/net/tcp/ftp.c @@ -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 ); diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index 5faffe99d..d6a9fad7e 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -547,7 +547,7 @@ int http_open_filter ( struct xfer_interface *xfer, struct uri *uri, http = zalloc ( sizeof ( *http ) ); if ( ! http ) return -ENOMEM; - http->refcnt.free = http_free; + ref_init ( &http->refcnt, http_free ); xfer_init ( &http->xfer, &http_xfer_operations, &http->refcnt ); http->uri = uri_get ( uri ); xfer_init ( &http->socket, &http_socket_operations, &http->refcnt ); diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c index 69d185047..24cbda2c5 100644 --- a/src/net/tcp/iscsi.c +++ b/src/net/tcp/iscsi.c @@ -1792,7 +1792,7 @@ int iscsi_attach ( struct scsi_device *scsi, const char *root_path ) { iscsi = zalloc ( sizeof ( *iscsi ) ); if ( ! iscsi ) return -ENOMEM; - iscsi->refcnt.free = iscsi_free; + ref_init ( &iscsi->refcnt, iscsi_free ); xfer_init ( &iscsi->socket, &iscsi_socket_operations, &iscsi->refcnt ); process_init ( &iscsi->process, iscsi_tx_step, &iscsi->refcnt ); |
