mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
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.
This commit is contained in:
parent
f01a9dd520
commit
425c50cf51
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43384
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user