Variable name cleanups
This commit is contained in:
parent
cc826c4ca6
commit
daeb46cf5a
|
@ -163,14 +163,14 @@ int system_property_get(const char *command,
|
|||
FILE *pipe;
|
||||
char buffer[BUFSIZ];
|
||||
char cmd[NAME_MAX_LENGTH];
|
||||
int length = 0;
|
||||
char *curpos = NULL;
|
||||
size_t buf_pos = strlcpy(cmd, command, sizeof(cmd));
|
||||
char *pos = NULL;
|
||||
size_t __len = 0;
|
||||
size_t _len = strlcpy(cmd, command, sizeof(cmd));
|
||||
|
||||
cmd[ buf_pos] = ' ';
|
||||
cmd[++buf_pos] = '\0';
|
||||
cmd[ _len] = ' ';
|
||||
cmd[++_len] = '\0';
|
||||
|
||||
strlcpy(cmd + buf_pos, args, sizeof(cmd) - buf_pos);
|
||||
strlcpy(cmd + _len, args, sizeof(cmd) - _len);
|
||||
|
||||
if (!(pipe = popen(cmd, "r")))
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ int system_property_get(const char *command,
|
|||
return 0;
|
||||
}
|
||||
|
||||
curpos = value;
|
||||
pos = value;
|
||||
|
||||
while (!feof(pipe))
|
||||
{
|
||||
|
@ -186,18 +186,16 @@ int system_property_get(const char *command,
|
|||
{
|
||||
size_t _len = strlen(buffer);
|
||||
|
||||
memcpy(curpos, buffer, _len);
|
||||
memcpy(pos, buffer, _len);
|
||||
|
||||
curpos += _len;
|
||||
length += _len;
|
||||
pos += _len;
|
||||
__len += _len;
|
||||
}
|
||||
}
|
||||
|
||||
*curpos = '\0';
|
||||
|
||||
*pos = '\0';
|
||||
pclose(pipe);
|
||||
|
||||
return length;
|
||||
return __len;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
|
|
Loading…
Reference in New Issue