sysconf(): Fix line parser for /proc files.

Change-Id: I2678010ee95933de19c8a8e3b2fe65ceb9b86400
This commit is contained in:
David 'Digit' Turner 2010-06-09 18:15:57 -07:00
parent 9205fdf8c6
commit 038fbae518
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,9 @@ Differences between current and Android 2.2:
- <sys/sysinfo.h>: Added missing sysinfo() system call implementation
(the function was already declared in the header though).
- sysconf() didn't work for some arguments due to a small bug in the
/proc line parser.
-------------------------------------------------------------------------------
Differences between Android 2.2. and Android 2.1:

View File

@ -317,7 +317,7 @@ line_parser_addc( LineParser* p, int c )
static int
line_parser_getc( LineParser* p )
{
if (p->in_len >= p->in_pos) {
if (p->in_pos >= p->in_len) {
int ret;
p->in_len = p->in_pos = 0;