summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_generic.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-01-29 08:10:35 +0000
committerbde <bde@FreeBSD.org>1999-01-29 08:10:35 +0000
commit82b636d3e35bfca1711cdd6c6d1e098b6ad99fea (patch)
treeb26607bf59e059320221d31d83fb10b965b7fda5 /sys/kern/sys_generic.c
parent85d7bb85d5c7a47f4ed480fb27b3cb82ab455556 (diff)
downloadFreeBSD-src-82b636d3e35bfca1711cdd6c6d1e098b6ad99fea.zip
FreeBSD-src-82b636d3e35bfca1711cdd6c6d1e098b6ad99fea.tar.gz
Removed a bogus cast to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice. Here the point of the original cast to caddr_t was to break the warning about the const mismatch between write(2)'s `const void *buf' and `struct uio's `char *iov_base' (previous bitrot gave a gratuitous dependency on caddr_t being char *). Compiling with -Wcast-qual made the cast a full no-op. This change has no effect on the warning for discarding `const' on assignment to iov_base. The warning should not be fixed by splitting `struct iovec' into a non-const version for read() and a const version for write(), since correct const poisoning would affect all pointers to i/o addresses. Const'ness should probably be forgotten by not declaring it in syscalls.master.
Diffstat (limited to 'sys/kern/sys_generic.c')
-rw-r--r--sys/kern/sys_generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 8d745f4..b607f71 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
- * $Id: sys_generic.c,v 1.43 1998/12/10 01:53:26 jkh Exp $
+ * $Id: sys_generic.c,v 1.44 1999/01/27 21:49:57 dillon Exp $
*/
#include "opt_ktrace.h"
@@ -248,7 +248,7 @@ write(p, uap)
(fp = fdp->fd_ofiles[uap->fd]) == NULL ||
(fp->f_flag & FWRITE) == 0)
return (EBADF);
- aiov.iov_base = (c_caddr_t)uap->buf;
+ aiov.iov_base = uap->buf;
aiov.iov_len = uap->nbyte;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
OpenPOWER on IntegriCloud