Skip to content

Commit c14e5a1

Browse files
rsbeckercagitster
authored andcommitted
transport-helper: use xread instead of read
This fix was needed on HPE NonStop NSE and NSX where SSIZE_MAX is less than BUFFERSIZE resulting in EINVAL. The call to read in transport-helper.c was the only place outside of wrapper.c where it is used instead of xread. Signed-off-by: Randall S. Becker <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b21ebb6 commit c14e5a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport-helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ static int udt_do_read(struct unidirectional_transfer *t)
12251225
return 0; /* No space for more. */
12261226

12271227
transfer_debug("%s is readable", t->src_name);
1228-
bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
1228+
bytes = xread(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
12291229
if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
12301230
errno != EINTR) {
12311231
error_errno(_("read(%s) failed"), t->src_name);

0 commit comments

Comments
 (0)