Author: Man Zeng <zengman@halodbtech.com>
Discussion: https://www.postgresql.org/message-id/tencent_566562B52163DB1502F4F7A4@qq.com
ssize_t rc;
rc = pg_pread(state->fd,
- &state->buf.data + bytes_read,
+ &state->buf.data[bytes_read],
BLCKSZ - bytes_read,
offset);
if (rc < 0)
/* unexpected EOF */
pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %u, reading as zeros",
state->fn, (unsigned int) offset);
- memset(&state->buf.data + bytes_read, 0, BLCKSZ - bytes_read);
+ memset(&state->buf.data[bytes_read], 0, BLCKSZ - bytes_read);
break;
}
bytes_read += rc;