Commit 7a3924fc38b63313e84c6339d2fd56084f5aeea6

Vicent Marti 2010-11-14T22:07:48

Fix overcomplicated return statement Note to self: don't be stupid Signed-off-by: Vicent Marti <tanoku@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/odb.c b/src/odb.c
index bf5ad7c..fc07a17 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1835,7 +1835,7 @@ int git_odb_exists(git_odb *db, const git_oid *id)
 {
 	obj_location loc;
 	assert(db && id);
-	return locate_object(&loc, db, id) == OBJ_LOCATION_NOTFOUND ? 0 : 1;
+	return locate_object(&loc, db, id) != OBJ_LOCATION_NOTFOUND;
 }
 
 int git_odb_read_header(git_rawobj *out, git_odb *db, const git_oid *id)