Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/osf1 remove (caddr_t) casts on "const" pointers, ...
details: https://anonhg.NetBSD.org/src/rev/d8f8b0dd3131
branches: trunk
changeset: 581423:d8f8b0dd3131
user: drochner <drochner%NetBSD.org@localhost>
date: Wed Jun 01 15:34:15 2005 +0000
description:
remove (caddr_t) casts on "const" pointers, and use __UNCONST()
where arguments are copied to the stackgap
diffstat:
sys/compat/osf1/osf1_file.c | 8 ++++----
sys/compat/osf1/osf1_generic.c | 8 ++++----
sys/compat/osf1/osf1_mount.c | 8 ++++----
sys/compat/osf1/osf1_socket.c | 6 +++---
sys/compat/osf1/osf1_time.c | 10 +++++-----
5 files changed, 20 insertions(+), 20 deletions(-)
diffs (180 lines):
diff -r cff9469fc6bd -r d8f8b0dd3131 sys/compat/osf1/osf1_file.c
--- a/sys/compat/osf1/osf1_file.c Wed Jun 01 15:30:33 2005 +0000
+++ b/sys/compat/osf1/osf1_file.c Wed Jun 01 15:34:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_file.c,v 1.18 2005/02/26 23:10:21 perry Exp $ */
+/* $NetBSD: osf1_file.c,v 1.19 2005/06/01 15:34:15 drochner Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.18 2005/02/26 23:10:21 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.19 2005/06/01 15:34:15 drochner Exp $");
#if defined(_KERNEL_OPT)
#include "opt_syscall_debug.h"
@@ -411,7 +411,7 @@
SCARG(&a, tptr) = stackgap_alloc(p, &sg, sizeof tv);
/* get the OSF/1 timeval argument */
- error = copyin((caddr_t)SCARG(uap, tptr),
+ error = copyin(SCARG(uap, tptr),
(caddr_t)&otv, sizeof otv);
if (error == 0) {
@@ -421,7 +421,7 @@
tv.tv_usec = otv.tv_usec;
error = copyout((caddr_t)&tv,
- (caddr_t)SCARG(&a, tptr), sizeof tv);
+ __UNCONST(SCARG(&a, tptr)), sizeof tv);
}
}
diff -r cff9469fc6bd -r d8f8b0dd3131 sys/compat/osf1/osf1_generic.c
--- a/sys/compat/osf1/osf1_generic.c Wed Jun 01 15:30:33 2005 +0000
+++ b/sys/compat/osf1/osf1_generic.c Wed Jun 01 15:34:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_generic.c,v 1.6 2005/02/26 23:10:21 perry Exp $ */
+/* $NetBSD: osf1_generic.c,v 1.7 2005/06/01 15:34:15 drochner Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.6 2005/02/26 23:10:21 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.7 2005/06/01 15:34:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -116,7 +116,7 @@
SCARG(&a, iovp) = stackgap_alloc(p, &sg, nsize);
SCARG(&a, iovcnt) = SCARG(uap, iovcnt);
- if ((error = copyout(nio, (caddr_t)SCARG(&a, iovp), nsize)))
+ if ((error = copyout(nio, __UNCONST(SCARG(&a, iovp)), nsize)))
goto punt;
error = sys_readv(l, &a, retval);
@@ -208,7 +208,7 @@
SCARG(&a, iovp) = stackgap_alloc(p, &sg, nsize);
SCARG(&a, iovcnt) = SCARG(uap, iovcnt);
- if ((error = copyout(nio, (caddr_t)SCARG(&a, iovp), nsize)))
+ if ((error = copyout(nio, __UNCONST(SCARG(&a, iovp)), nsize)))
goto punt;
error = sys_writev(l, &a, retval);
diff -r cff9469fc6bd -r d8f8b0dd3131 sys/compat/osf1/osf1_mount.c
--- a/sys/compat/osf1/osf1_mount.c Wed Jun 01 15:30:33 2005 +0000
+++ b/sys/compat/osf1/osf1_mount.c Wed Jun 01 15:34:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_mount.c,v 1.28 2005/02/26 23:10:21 perry Exp $ */
+/* $NetBSD: osf1_mount.c,v 1.29 2005/06/01 15:34:15 drochner Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.28 2005/02/26 23:10:21 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.29 2005/06/01 15:34:15 drochner Exp $");
#if defined(_KERNEL_OPT)
#include "fs_nfs.h"
@@ -300,7 +300,7 @@
len = strlen(mfs_name) + 1;
SCARG(bsd_argp, type) = stackgap_alloc(p, &sg, len);
- if ((error = copyout(mfs_name, (void *)SCARG(bsd_argp, type), len)))
+ if ((error = copyout(mfs_name, __UNCONST(SCARG(bsd_argp, type)), len)))
return error;
return 0;
@@ -363,7 +363,7 @@
len = strlen(nfs_name) + 1;
SCARG(bsd_argp, type) = stackgap_alloc(p, &sg, len);
- if ((error = copyout(MOUNT_NFS, (void *)SCARG(bsd_argp, type), len)))
+ if ((error = copyout(MOUNT_NFS, __UNCONST(SCARG(bsd_argp, type)), len)))
return error;
return 0;
diff -r cff9469fc6bd -r d8f8b0dd3131 sys/compat/osf1/osf1_socket.c
--- a/sys/compat/osf1/osf1_socket.c Wed Jun 01 15:30:33 2005 +0000
+++ b/sys/compat/osf1/osf1_socket.c Wed Jun 01 15:34:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_socket.c,v 1.10 2005/02/26 23:10:21 perry Exp $ */
+/* $NetBSD: osf1_socket.c,v 1.11 2005/06/01 15:34:15 drochner Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.10 2005/02/26 23:10:21 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.11 2005/06/01 15:34:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -131,7 +131,7 @@
bsd_msghdr.msg_iov = stackgap_alloc(p, &sg,
bsd_msghdr.msg_iovlen * sizeof (struct iovec));
- if ((error = copyout(&bsd_msghdr, (caddr_t)SCARG(&a, msg),
+ if ((error = copyout(&bsd_msghdr, __UNCONST(SCARG(&a, msg)),
sizeof bsd_msghdr)) != 0)
return (error);
diff -r cff9469fc6bd -r d8f8b0dd3131 sys/compat/osf1/osf1_time.c
--- a/sys/compat/osf1/osf1_time.c Wed Jun 01 15:30:33 2005 +0000
+++ b/sys/compat/osf1/osf1_time.c Wed Jun 01 15:34:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_time.c,v 1.8 2005/02/26 23:10:21 perry Exp $ */
+/* $NetBSD: osf1_time.c,v 1.9 2005/06/01 15:34:15 drochner Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_time.c,v 1.8 2005/02/26 23:10:21 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_time.c,v 1.9 2005/06/01 15:34:15 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -149,7 +149,7 @@
b_itv.it_value.tv_usec = o_itv.it_value.tv_usec;
error = copyout((caddr_t)&b_itv,
- (caddr_t)SCARG(&a, itv), sizeof b_itv);
+ __UNCONST(SCARG(&a, itv)), sizeof b_itv);
}
if (SCARG(uap, oitv) == NULL)
@@ -262,7 +262,7 @@
tv.tv_usec = otv.tv_usec;
error = copyout((caddr_t)&tv,
- (caddr_t)SCARG(&a, tv), sizeof tv);
+ __UNCONST(SCARG(&a, tv)), sizeof tv);
}
}
@@ -282,7 +282,7 @@
tz.tz_dsttime = otz.tz_dsttime;
error = copyout((caddr_t)&tz,
- (caddr_t)SCARG(&a, tzp), sizeof tz);
+ __UNCONST(SCARG(&a, tzp)), sizeof tz);
}
}
Home |
Main Index |
Thread Index |
Old Index