Thread (7 messages) flat view 7 messages, 6 authors, 2021-08-19

Re: [PATCH] fixup! propagate errno from failing read

From: Jonathan Tan <hidden>
Date: 2021-08-17 16:14:35

quoted hunk ↗ jump to hunk
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 0d96eeba61b..f546cc3cc3d 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -454,6 +454,7 @@ stat_ref:
 	}
 	strbuf_reset(&sb_contents);
 	if (strbuf_read(&sb_contents, fd, 256) < 0) {
+		myerr = errno;
 		close(fd);
 		goto out;
 	}
Reviewed-by: Jonathan Tan <redacted>

Thanks - a straightforward fixup. (I don't think we need the errno from
close() in this case.)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help