Avoid doing arithmetic on void pointers.
Whatever compiler settings AOSP is using warns that this is a GNU extension. Change-Id: Ife395d2b206b607b14c713cbb5a94d479816dad0 Reviewed-on: https://boringssl-review.googlesource.com/7604 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
4b7b048417
commit
bfefc27c2b
@ -64,12 +64,13 @@ static ssize_t read_eintr(int fd, void *out, size_t len) {
|
||||
/* read_full reads exactly |len| bytes from |fd| to |out|. On error or end of
|
||||
* file, it returns zero. */
|
||||
static int read_full(int fd, void *out, size_t len) {
|
||||
char *outp = out;
|
||||
while (len > 0) {
|
||||
ssize_t ret = read_eintr(fd, out, len);
|
||||
ssize_t ret = read_eintr(fd, outp, len);
|
||||
if (ret <= 0) {
|
||||
return 0;
|
||||
}
|
||||
out += ret;
|
||||
outp += ret;
|
||||
len -= ret;
|
||||
}
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user