Fixed silly repeated calls to strlen()

This commit is contained in:
Googer 2015-02-24 12:41:23 -05:00
parent 03b4ace443
commit fe176fc01b

View File

@ -448,9 +448,10 @@ static int system_property_get(const char *name, char *value)
{
if (fgets(buffer, 128, pipe) != NULL)
{
memcpy(curpos, buffer, strlen(buffer));
curpos += strlen(buffer);
length += strlen(buffer);
int curlen = strlen(buffer);
memcpy(curpos, buffer, curlen);
curpos += curlen;
length += curlen;
}
}
*curpos = '\0';