diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-12-29 13:04:38 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-12-29 13:04:38 +0000 |
commit | ba02f4c341ab798b8da15c745fc34262ae5a5453 (patch) | |
tree | 9473fe40366c845b982fc8384589829f15cd5fe0 /sys/dev/ic | |
parent | b7675ae17e9bbe19e88fdbe069031a9a676974c3 (diff) |
Avoid void * arithmetic, okay deraadt@, suggestions from millert@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/twe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index dfe26330469..b17721ef9a1 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe.c,v 1.26 2006/11/28 23:59:45 dlg Exp $ */ +/* $OpenBSD: twe.c,v 1.27 2006/12/29 13:04:37 pedro Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved. @@ -185,7 +185,7 @@ twe_attach(sc) pa = sc->sc_cmdmap->dm_segs[0].ds_addr + sizeof(struct twe_cmd) * (TWE_MAXCMDS - 1); - for (cmd = sc->sc_cmds + sizeof(struct twe_cmd) * (TWE_MAXCMDS - 1); + for (cmd = (struct twe_cmd *)sc->sc_cmds + TWE_MAXCMDS - 1; cmd >= (struct twe_cmd *)sc->sc_cmds; cmd--, pa -= sizeof(*cmd)) { cmd->cmd_index = cmd - (struct twe_cmd *)sc->sc_cmds; |