From 786b4a31328c5d9ee42326fca6f3b52a0bfc62db Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sun, 16 Dec 2001 17:38:30 +0000 Subject: [PATCH] Remove reliance on i++ in multiple arguments to a function. C does not guarantee the order of increment. Noticed by: GCC 3.0 use by the Linux community and jhb --- sys/dev/aic7xxx/aic7xxx.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 3739a3cd134f..8b6c6342c6bf 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -1382,22 +1382,9 @@ ahc_print_scb(struct scb *scb) hscb->scsiid, hscb->lun, hscb->cdb_len); - i = 0; - printf("Shared Data: %#02x %#02x %#02x %#02x\n", - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++]); - printf(" %#02x %#02x %#02x %#02x\n", - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++]); - printf(" %#02x %#02x %#02x %#02x\n", - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++], - hscb->shared_data.cdb[i++]); + printf("Shared Data: "); + for (i = 0; i < sizeof(hscb->shared_data.cdb); i++) + printf("%#02x", hscb->shared_data.cdb[i]); printf(" dataptr:%#x datacnt:%#x sgptr:%#x tag:%#x\n", ahc_le32toh(hscb->dataptr), ahc_le32toh(hscb->datacnt),