summaryrefslogtreecommitdiff
path: root/src/revparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revparse.c')
-rw-r--r--src/revparse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/revparse.c b/src/revparse.c
index 8a45889bb..1518a7c3c 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -511,8 +511,8 @@ static int walk_and_search(git_object **out, git_revwalk *walk, regex_t *regex)
while (!(error = git_revwalk_next(&oid, walk))) {
- if ((error = git_object_lookup(&obj, git_revwalk_repository(walk), &oid, GIT_OBJ_COMMIT) < 0) &&
- (error != GIT_ENOTFOUND))
+ error = git_object_lookup(&obj, git_revwalk_repository(walk), &oid, GIT_OBJ_COMMIT);
+ if ((error < 0) && (error != GIT_ENOTFOUND))
return -1;
if (!regexec(regex, git_commit_message((git_commit*)obj), 0, NULL, 0)) {
@@ -635,7 +635,7 @@ static int extract_how_many(int *n, const char *spec, size_t *pos)
} while (spec[(*pos)] == kind && kind == '~');
if (git__isdigit(spec[*pos])) {
- if ((git__strtol32(&parsed, spec + *pos, &end_ptr, 10) < 0) < 0)
+ if (git__strtol32(&parsed, spec + *pos, &end_ptr, 10) < 0)
return GIT_EINVALIDSPEC;
accumulated += (parsed - 1);