Commit Diff


commit - 6934d8276a5597290aa75da9690021b694ce66e3
commit + 6f70de963ae03e950c350d5e1e41ce4aa02c7527
blob - f2dbcb38ea508b565dbea5ebfbccbf5530868b1c
blob + 1c9832d0195d7c41914a2d770e4a13e40adf7c11
--- cvg/cvg.c
+++ cvg/cvg.c
@@ -6917,10 +6917,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 - eedba272792e095dfe5a62504a47e88c579c69c8
blob + 31715c841834b287b37b67adb87a8ffbd489caa7
--- got/got.c
+++ got/got.c
@@ -8561,10 +8561,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;