diff options
| author | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-06-15 03:22:30 +0000 |
|---|---|---|
| committer | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-06-15 03:22:30 +0000 |
| commit | b83977f0a4fc0002456424d7c1a02d42790b2a4c (patch) | |
| tree | 783342fab60db8ba21f0e04c9f5ba9fc9597fc9a | |
| parent | 19fc8e7c05106f7eda34781e2d8c4e9da0cdec67 (diff) | |
Notes
| -rw-r--r-- | sys/dev/firewire/fwcrom.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/firewire/fwcrom.c b/sys/dev/firewire/fwcrom.c index 19dd37f9fbdb..bf85ae2624dc 100644 --- a/sys/dev/firewire/fwcrom.c +++ b/sys/dev/firewire/fwcrom.c @@ -434,7 +434,7 @@ crom_add_simple_text(struct crom_src *src, struct crom_chunk *parent, tl->spec_type = 0; tl->lang_id = 0; p = (u_int32_t *) buf; - for (i = 0; i < howmany(len, sizeof(u_int32_t)) / 4; i ++) + for (i = 0; i < howmany(len, sizeof(u_int32_t)); i ++) tl->text[i] = ntohl(*p++); return (crom_add_chunk(src, parent, chunk, CROM_TEXTLEAF)); } @@ -456,8 +456,9 @@ crom_load(struct crom_src *src, u_int32_t *buf, int maxlen) { struct crom_chunk *chunk, *parent; struct csrhdr *hdr; -#if 0 +#ifdef _KERNEL u_int32_t *ptr; + int i; #endif int count, offset; int len; @@ -494,9 +495,9 @@ crom_load(struct crom_src *src, u_int32_t *buf, int maxlen) } hdr = (struct csrhdr *)buf; hdr->crc_len = count - 1; - hdr->crc = crom_crc(buf + 1, hdr->crc_len); + hdr->crc = crom_crc(&buf[1], hdr->crc_len); -#if 0 +#ifdef _KERNEL /* byte swap */ ptr = buf; for (i = 0; i < count; i ++) { |
