From 8ae1cac0502c2a4d946f7bafa15a944bb1ef48a2 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 15 Feb 2009 08:41:46 +0000 Subject: [xfer] Make consistent assumptions that xfer metadata can never be NULL The documentation in xfer.h and xfer.c does not say that the metadata parameter is optional in calls such as xfer_deliver_iob_meta() and the deliver_iob() method. However, some code in net/ is prepared to accept a NULL pointer, and xfer_deliver_as_iob() passes a NULL pointer directly to the deliver_iob() method. Fix this mess of conflicting assumptions by making everything assume that the metadata parameter is mandatory, and fixing xfer_deliver_as_iob() to pass in a dummy metadata structure (as is already done in xfer_deliver_iob()). --- src/net/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/tcp.c') diff --git a/src/net/tcp.c b/src/net/tcp.c index 094317b3a..6bcd193c7 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -1033,7 +1033,7 @@ static size_t tcp_xfer_window ( struct xfer_interface *xfer ) { * * @v xfer Data transfer interface * @v iobuf Datagram I/O buffer - * @v meta Data transfer metadata, or NULL + * @v meta Data transfer metadata * @ret rc Return status code */ static int tcp_xfer_deliver_iob ( struct xfer_interface *xfer, -- cgit v1.2.3-55-g7522