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).
This commit is contained in:
enami 2000-11-30 06:59:08 +00:00
parent a89beb967d
commit 99a39489d8
1 changed files with 2 additions and 2 deletions

View File

@ -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);