Commit ade3c9bb88b0afb4b025cf92c74e17704c9bc4f4

Carlos Martín Nieto 2011-08-07T10:26:33

Assert a filename in indexer creation Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/indexer.c b/src/indexer.c
index 0ab54f7..23556a3 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -102,6 +102,8 @@ int git_indexer_new(git_indexer **out, const char *packname)
 	unsigned int namelen;
 	int ret, error;
 
+	assert(out && packname);
+
 	if (git_path_root(packname) < 0)
 		return git__throw(GIT_EINVALIDPATH, "Path is not absolute");