Commit c7c59d3c0510a0bf293d307ddbbcc4db4e0b48bd

Stefan Sperling 2019-04-13T18:38:29

remove unused variable in got_object_parse_header()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/object_parse.c b/lib/object_parse.c
index dce2309..5e3bfc4 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -146,13 +146,9 @@ got_object_parse_header(struct got_object **obj, char *buf, size_t len)
 	int type = 0;
 	size_t size = 0, hdrlen = 0;
 	int i;
-	char *p = strchr(buf, '\0');
 
 	*obj = NULL;
 
-	if (p == NULL)
-		return got_error(GOT_ERR_BAD_OBJ_HDR);
-
 	hdrlen = strnlen(buf, len) + 1 /* '\0' */;
 	if (hdrlen > len)
 		return got_error(GOT_ERR_BAD_OBJ_HDR);