Commit d6eb3f9ce7f3b794d8e9ec2bb52bf995dd32cde9

Ben Straub 2013-11-05T10:54:44

Remove unnecessary check

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/netops.c b/src/netops.c
index 1a0d102..ce49116 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -721,7 +721,7 @@ int gitno_extract_url_parts(
 
 	if (u.field_set & (1 << UF_USERINFO)) {
 		const char *colon = memchr(_userinfo, ':', u.field_data[UF_USERINFO].len);
-		if (colon && (colon - _userinfo) < u.field_data[UF_USERINFO].len) {
+		if (colon) {
 			*username = unescape(git__substrdup(_userinfo, colon - _userinfo));
 			*password = unescape(git__substrdup(colon+1, u.field_data[UF_USERINFO].len - (colon+1-_userinfo)));
 			GITERR_CHECK_ALLOC(*password);