Fixed silly repeated calls to strlen()

This commit is contained in:
Googer 2015-02-24 12:41:23 -05:00
parent 03b4ace443
commit fe176fc01b
1 changed files with 5 additions and 4 deletions

View File

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