remove commented out #includes etc

move get_hz to the only caller
This commit is contained in:
Denis Vlasenko
2006-12-31 18:58:32 +00:00
parent 98ee06d3d4
commit 13463af29f
6 changed files with 22 additions and 42 deletions

View File

@@ -294,26 +294,6 @@ int inet_addr_match(inet_prefix * a, inet_prefix * b, int bits)
return 0;
}
int __iproute2_hz_internal;
int __get_hz(void)
{
int hz = 0;
FILE *fp = fopen("/proc/net/psched", "r");
if (fp) {
unsigned nom, denom;
if (fscanf(fp, "%*08x%*08x%08x%08x", &nom, &denom) == 2)
if (nom == 1000000)
hz = denom;
fclose(fp);
}
if (hz)
return hz;
return sysconf(_SC_CLK_TCK);
}
const char *rt_addr_n2a(int af, int ATTRIBUTE_UNUSED len,
void *addr, char *buf, int buflen)
{