Commit 046dfea343964bdac55b14864f2e002a07c39813

Kirill A. Shutemov 2011-07-12T19:01:09

vector: avoid double asserting index_initialize() calls assert() for arguments on its own. No need to call it twice. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/index.c b/src/index.c
index 9883287..6f874d5 100644
--- a/src/index.c
+++ b/src/index.c
@@ -178,7 +178,6 @@ static int index_initialize(git_index **index_out, git_repository *owner, const 
 
 int git_index_open(git_index **index_out, const char *index_path)
 {
-	assert(index_out && index_path);
 	return index_initialize(index_out, NULL, index_path);
 }
 
@@ -187,8 +186,6 @@ int git_index_open(git_index **index_out, const char *index_path)
  */
 int git_repository_index(git_index **index_out, git_repository *repo)
 {
-	assert(index_out && repo);
-
 	if (repo->is_bare)
 		return git__throw(GIT_EBAREINDEX, "Failed to open index. Repository is bare");