summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-12-29 13:04:38 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-12-29 13:04:38 +0000
commitba02f4c341ab798b8da15c745fc34262ae5a5453 (patch)
tree9473fe40366c845b982fc8384589829f15cd5fe0 /sys/kern
parentb7675ae17e9bbe19e88fdbe069031a9a676974c3 (diff)
Avoid void * arithmetic, okay deraadt@, suggestions from millert@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/exec_elf.c4
-rw-r--r--sys/kern/uipc_mbuf.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index c09aba62e95..a3e90d30f5f 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.55 2006/11/14 18:00:27 jmc Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.56 2006/12/29 13:04:37 pedro Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -159,7 +159,7 @@ ELFNAME(copyargs)(struct exec_package *pack, struct ps_strings *arginfo,
*/
if (pack->ep_interp != NULL) {
pack->ep_emul_argp = stack;
- stack += ELF_AUX_ENTRIES * sizeof (AuxInfo);
+ (char *)stack += ELF_AUX_ENTRIES * sizeof (AuxInfo);
}
return (stack);
}
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 4320cf39cc3..1496a8d6442 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.78 2006/11/29 12:39:48 miod Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.79 2006/12/29 13:04:37 pedro Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -380,11 +380,12 @@ m_copydata(struct mbuf *m, int off, int len, caddr_t cp)
* including the setting of m_len.
*/
void
-m_copyback(struct mbuf *m0, int off, int len, const void *cp)
+m_copyback(struct mbuf *m0, int off, int len, const void *_cp)
{
int mlen;
struct mbuf *m = m0, *n;
int totlen = 0;
+ caddr_t cp = (caddr_t)_cp;
if (m0 == NULL)
return;