Add an example of a novel technique to the IPv6 code. This technique seems

to have been developed after the IPv6 code was written, it's called "checking
for error returns".

Now netstat at least doesnt't go beserk in jails.
This commit is contained in:
Poul-Henning Kamp 2001-03-19 08:51:56 +00:00
parent fe997d964c
commit 6eec3af9fe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74453

View File

@ -348,7 +348,8 @@ ip6_stats(off, name)
if (off == 0)
return;
kread(off, (char *)&ip6stat, sizeof (ip6stat));
if (kread(off, (char *)&ip6stat, sizeof (ip6stat)))
return;
printf("%s:\n", name);
#define p(f, m) if (ip6stat.f || sflag <= 1) \