}
ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
- uint8_t *p = buf;
+ uint8_t *p = ASSERT_PTR(buf);
ssize_t n = 0;
assert(fd >= 0);
- assert(buf);
/* If called with nbytes == 0, let's call read() at least
* once, to validate the operation */
}
int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) {
- const uint8_t *p = buf;
+ const uint8_t *p = ASSERT_PTR(buf);
assert(fd >= 0);
- assert(buf);
if (_unlikely_(nbytes > (size_t) SSIZE_MAX))
return -EINVAL;