Introduction
Introduction Statistics Contact Development Disclaimer Help
tsmall code cleanup: no need for status variable - stagit - static git page gen…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit ede93fa7ee0af8e6e858981e1a7e5057646487ce
parent 45ee6876d5027311d0ac81345c27b3ee6e8fd43d
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 1 May 2016 19:08:36 +0200
small code cleanup: no need for status variable
Diffstat:
M stagit.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -1013,7 +1013,6 @@ main(int argc, char *argv[])
const git_error *e = NULL;
FILE *fp, *fpread;
char path[PATH_MAX], repodirabs[PATH_MAX + 1], *p;
- int status;
if (argc != 2) {
fprintf(stderr, "%s <repodir>\n", argv[0]);
t@@ -1026,11 +1025,11 @@ main(int argc, char *argv[])
git_libgit2_init();
- if ((status = git_repository_open_ext(&repo, repodir,
- GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) < 0) {
+ if (git_repository_open_ext(&repo, repodir,
+ GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
e = giterr_last();
fprintf(stderr, "%s: %s\n", argv[0], e->message);
- return status;
+ return 1;
}
/* find HEAD */
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.