summaryrefslogtreecommitdiff
path: root/bfd/vms-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/vms-lib.c')
-rw-r--r--bfd/vms-lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index c9a9fc695d..6e86df3b5c 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -951,11 +951,12 @@ vms_lib_dcx (struct vms_lib_iovec *vec, unsigned char *buf, file_ptr nbytes)
/* Standard IOVEC function. */
static file_ptr
-vms_lib_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
+vms_lib_bread (struct bfd *abfd, void *vbuf, file_ptr nbytes)
{
struct vms_lib_iovec *vec = (struct vms_lib_iovec *) abfd->iostream;
file_ptr res;
file_ptr chunk;
+ unsigned char *buf = (unsigned char *)vbuf;
/* Do not read past the end. */
if (vec->where >= vec->file_len)
@@ -1071,7 +1072,7 @@ vms_lib_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
}
if (buf != NULL)
{
- *(unsigned char *)buf = c;
+ *buf = c;
buf++;
}
nbytes--;