1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

[dns] cast to char * in safe_read and safe_write calls

This commit is contained in:
Witold Filipczyk 2022-02-21 16:34:21 +01:00
parent 95bd39ff72
commit f6c9047f22

View File

@ -247,7 +247,7 @@ write_dns_data(int h, void *data, size_t datalen)
size_t done = 0;
do {
int w = safe_write(h, data + done, datalen - done);
int w = safe_write(h, ((char *)data) + done, datalen - done);
if (w < 0) return DNS_ERROR;
done += w;
@ -294,7 +294,7 @@ read_dns_data(int h, void *data, size_t datalen)
size_t done = 0;
do {
ssize_t r = safe_read(h, data + done, datalen - done);
ssize_t r = safe_read(h, ((char *)data) + done, datalen - done);
if (r <= 0) return DNS_ERROR;
done += r;