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:
phk 2001-03-19 08:51:56 +00:00
parent 104bc06e0a
commit dabce43c5b

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) \