Commit Diff


commit - bdf3f05ed09d141be02261c391d9e0a71c631e74
commit + 37ee718b316ee5003e14168354db4fbac065996b
blob - 14c7a67587111b249ac93afcdbfbd6952c8bb01a
blob + 943d3eba43b2c107ab04b4edf1be027c04f6c10d
--- cvg/cvg.c
+++ cvg/cvg.c
@@ -6915,10 +6915,8 @@ cmd_patch(int argc, char *argv[])
 			return error;
 	} else if (argc == 1) {
 		patchfd = open(argv[0], O_RDONLY);
-		if (patchfd == -1) {
-			error = got_error_from_errno2("open", argv[0]);
-			return error;
-		}
+		if (patchfd == -1)
+			return got_error_from_errno2("open", argv[0]);
 		if (fstat(patchfd, &sb) == -1) {
 			error = got_error_from_errno2("fstat", argv[0]);
 			goto done;
blob - 3d79f079d176f8e5a73b8c4a5760a9ec689b1213
blob + 923b7d42d5db32fc669567872897022c05334558
--- got/got.c
+++ got/got.c
@@ -8560,10 +8560,8 @@ cmd_patch(int argc, char *argv[])
 			return error;
 	} else if (argc == 1) {
 		patchfd = open(argv[0], O_RDONLY);
-		if (patchfd == -1) {
-			error = got_error_from_errno2("open", argv[0]);
-			return error;
-		}
+		if (patchfd == -1)
+			return got_error_from_errno2("open", argv[0]);
 		if (fstat(patchfd, &sb) == -1) {
 			error = got_error_from_errno2("fstat", argv[0]);
 			goto done;