From 99a39489d8f3ff7b88c7d152108f898c32dd83eb Mon Sep 17 00:00:00 2001 From: enami Date: Thu, 30 Nov 2000 06:59:08 +0000 Subject: [PATCH] Pass the right size of object (in this case, a trailer) to fwohci_buf_pktget. Since the fp_trail is a pointer to trailer, we have to pass sizeof(*fp_trail) instead of sizeof(fp_trail). --- sys/dev/ieee1394/fwohci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ieee1394/fwohci.c b/sys/dev/ieee1394/fwohci.c index 0e9c0462b796..1f527e092ba1 100644 --- a/sys/dev/ieee1394/fwohci.c +++ b/sys/dev/ieee1394/fwohci.c @@ -1157,7 +1157,7 @@ fwohci_buf_input(struct fwohci_softc *sc, struct fwohci_ctx *fc, * in descriptor is set. */ len = fwohci_buf_pktget(sc, fc, (caddr_t *)&pkt->fp_trail, - sizeof(pkt->fp_trail)); + sizeof(*pkt->fp_trail)); if (len <= 0) { #ifdef FW_DEBUG if (fw_verbose) @@ -1242,7 +1242,7 @@ fwohci_buf_input(struct fwohci_softc *sc, struct fwohci_ctx *fc, if (!fc->fc_isoch) { /* get trailer */ len = fwohci_buf_pktget(sc, fc, (caddr_t *)&pkt->fp_trail, - sizeof(pkt->fp_trail)); + sizeof(*pkt->fp_trail)); if (len <= 0) { printf("fwohci_buf_input: malformed input 3: %d\n", pkt->fp_hlen - count);