am 68ec71eb: am 7d03c9cb: pathconf: dead loop in bionic function __2_symlinks

* commit '68ec71ebd6df12596dc5688c907c76ea4b32c9b4':
  pathconf: dead loop in bionic function __2_symlinks
This commit is contained in:
Bruce Beare 2011-12-12 15:30:11 -08:00 committed by Android Git Automerger
commit cb4d9c0e1d

View File

@ -70,13 +70,12 @@ __filesizebits( struct statfs* s )
};
int nn = 0;
for (;;) {
if ( known64[nn] == EOL_MAGIC )
return 32;
if ( known64[nn] == s->f_type )
for (; known64[nn] != EOL_MAGIC; ++nn) {
if (known64[nn] == s->f_type) {
return 64;
}
}
return 32;
}
@ -99,12 +98,10 @@ __link_max( struct statfs* s )
};
int nn = 0;
for (;;) {
if ( knownMax[nn].type == EOL_MAGIC )
return LINK_MAX;
if ( knownMax[nn].type == s->f_type )
for (; knownMax[nn].type != EOL_MAGIC; ++nn) {
if (knownMax[nn].type == s->f_type) {
return knownMax[nn].max;
}
}
return LINK_MAX;
}
@ -121,12 +118,12 @@ __2_symlinks( struct statfs* s )
};
int nn = 0;
for (;;) {
if (knownNoSymlinks[nn] == 0)
return 1;
if (knownNoSymlinks[nn] == s->f_type)
for (; knownNoSymlinks[nn] != EOL_MAGIC; ++nn) {
if (knownNoSymlinks[nn] == s->f_type) {
return 0;
}
}
return 1;
}
static long