Commit 1616fa68e520dbd29b839335065599f8a2b93a6f

Evan Hanson 2013-08-15T17:25:05

revparse: Use more idiomatic error value test

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/revparse.c b/src/revparse.c
index 2fdad00..b84f003 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -913,7 +913,7 @@ int git_revparse(
 		}
 
 		error = git_revparse_single(&revspec->from, repo, lstr);
-		if (error == 0)
+		if (!error)
 			error = git_revparse_single(&revspec->to, repo, rstr);
 
 		git__free((void*)lstr);