Silence a warning on systems without carp(4).

This commit is contained in:
Ruslan Ermilov 2005-04-12 08:47:04 +00:00
parent 811787079b
commit 45125e147a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144935

View File

@ -540,7 +540,8 @@ carp_stats(u_long off, const char *name, int af1 __unused)
memset(&zerostat, 0, len);
if (sysctlbyname("net.inet.carp.stats", &carpstat, &len,
zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
warn("sysctl: net.inet.carp.stats");
if (errno != ENOENT)
warn("sysctl: net.inet.carp.stats");
return;
}