Commit d731afa8 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Adjusted logic for error checks to be similar to the code now

	used.  In particular, don't test sysconf(_SC_OPEN_MAX), and
	don't test getrlimit if HAVE_BROKEN_NOFILE.
parent 2e3ea04a
......@@ -177,26 +177,15 @@ main(void)
fflush(stdout);
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE) \
&& !defined(HAVE_BROKEN_NOFILE)
if (s.post.max_seen != 0 && s.post.max_seen != LOW_LIMIT)
{
fprintf(stderr, "ERROR: open-post not equal to LOW_LIMIT\n");
errs++;
}
if (s.post.sysconfmax != 0)
{
if (s.post.sysconfmax != s.post.max_seen)
{
fprintf(stderr, "ERROR: open-post not equal to sysconf-post\n");
errs++;
}
if (s.post.getdtable != 0 && s.post.getdtable != s.post.max_seen)
{
fprintf(stderr,
"WARNING: open-post not equal to getdtable-post\n");
}
}
else if (s.post.getdtable != 0)
#else
if (s.post.getdtable != 0)
{
if (s.post.getdtable != s.post.max_seen)
{
......@@ -217,6 +206,7 @@ main(void)
errs++;
}
}
#endif
exit(!!errs);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment