Commit 8146fe7cb9b2c8161ff7d773548237682b1e7a98

Vicent Marti 2011-05-23T21:41:13

index: Fix unused error messages

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/index.c b/src/index.c
index c738c24..3897802 100644
--- a/src/index.c
+++ b/src/index.c
@@ -687,12 +687,12 @@ static int read_header(struct index_header *dest, const void *buffer)
 
 	dest->signature = ntohl(source->signature);
 	if (dest->signature != INDEX_HEADER_SIG)
-		return git__throw(GIT_EOBJCORRUPTED, "Failed to read header. Invalid signature");
+		return GIT_EOBJCORRUPTED;
 
 	dest->version = ntohl(source->version);
 	if (dest->version != INDEX_VERSION_NUMBER_EXT &&
 		dest->version != INDEX_VERSION_NUMBER)
-		return git__throw(GIT_EOBJCORRUPTED, "Failed to read header. Invalid index version number");
+		return GIT_EOBJCORRUPTED;
 
 	dest->entry_count = ntohl(source->entry_count);
 	return GIT_SUCCESS;