diff options
author | phk <phk@FreeBSD.org> | 2001-03-19 08:51:56 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-03-19 08:51:56 +0000 |
commit | dabce43c5b93b638113eb1b7059ca91b32eb3607 (patch) | |
tree | 454474f7e24ae5078788860f1cd763859c3bbf04 /usr.bin | |
parent | 104bc06e0abfd6c86be0b2d8f8490a34d46f2990 (diff) | |
download | FreeBSD-src-dabce43c5b93b638113eb1b7059ca91b32eb3607.zip FreeBSD-src-dabce43c5b93b638113eb1b7059ca91b32eb3607.tar.gz |
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.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/inet6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 0dd9e4e..50d57e1 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -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) \ |