Commit d8b5c8c3 by Maks Naumov

Remove strlen() calls from loop condition

Avoid str length recalculation every iteration
parent 4d6f55ac
......@@ -277,7 +277,7 @@ GIT_INLINE(int) git__fromhex(char h)
GIT_INLINE(int) git__ishex(const char *str)
{
unsigned i;
for (i=0; i<strlen(str); i++)
for (i=0; str[i] != '\0'; i++)
if (git__fromhex(str[i]) < 0)
return 0;
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment