Commit Diff


commit - 7f7ab60bfe9338580d076c4902c6e9a2bf663f9c
commit + 71f25145f5a3d77d3997993b5cae0f055cae5398
blob - 2976854d83cb390029498f43b01d4415be34a84e
blob + 6c7279f557ae946cfa0aec99363491725ed0800c
--- lib/diff.c
+++ lib/diff.c
@@ -219,8 +219,10 @@ diff_blobs(struct got_diff_line **lines, size_t *nline
 		}
 		n = fprintf(outfile, "blob - %s%s\n", idstr1,
 		    modestr1 ? modestr1 : "");
-		if (n < 0)
+		if (n < 0) {
+			err = got_error_from_errno("fprintf");
 			goto done;
+		}
 		outoff += n;
 		if (lines && *lines) {
 			err = add_line_metadata(lines, nlines, outoff,
@@ -231,8 +233,10 @@ diff_blobs(struct got_diff_line **lines, size_t *nline
 
 		n = fprintf(outfile, "blob + %s%s\n", idstr2,
 		    modestr2 ? modestr2 : "");
-		if (n < 0)
+		if (n < 0) {
+			err = got_error_from_errno("fprintf");
 			goto done;
+		}
 		outoff += n;
 		if (lines && *lines) {
 			err = add_line_metadata(lines, nlines, outoff,