stagit

small code cleanup: no need for status variable

Hiltjo Posthuma contact@arjunchoudhary.com

commit: edcabd9 parent: 0e38fc4
1 files changed, 3 insertions(+), 4 deletions(-)
Mstagit.c+3-4
M · stagit.c +3, -4
 1@@ -1013,7 +1013,6 @@ main(int argc, char *argv[])
 2 	const git_error *e = NULL;
 3 	FILE *fp, *fpread;
 4 	char path[PATH_MAX], repodirabs[PATH_MAX + 1], *p;
 5-	int status;
 6 
 7 	if (argc != 2) {
 8 		fprintf(stderr, "%s <repodir>\n", argv[0]);
 9@@ -1026,11 +1025,11 @@ main(int argc, char *argv[])
10 
11 	git_libgit2_init();
12 
13-	if ((status = git_repository_open_ext(&repo, repodir,
14-		GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) < 0) {
15+	if (git_repository_open_ext(&repo, repodir,
16+		GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
17 		e = giterr_last();
18 		fprintf(stderr, "%s: %s\n", argv[0], e->message);
19-		return status;
20+		return 1;
21 	}
22 
23 	/* find HEAD */