Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/netstat sockb is only used locally, so move it into ...



details:   https://anonhg.NetBSD.org/src/rev/2f4aeb99772f
branches:  trunk
changeset: 1009420:2f4aeb99772f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Apr 23 00:24:16 2020 +0000

description:
sockb is only used locally, so move it into the function

diffstat:

 usr.bin/netstat/inet6.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r bda7c7109ae2 -r 2f4aeb99772f usr.bin/netstat/inet6.c
--- a/usr.bin/netstat/inet6.c   Thu Apr 23 00:23:31 2020 +0000
+++ b/usr.bin/netstat/inet6.c   Thu Apr 23 00:24:16 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet6.c,v 1.73 2019/08/18 04:14:40 kamil Exp $ */
+/*     $NetBSD: inet6.c,v 1.74 2020/04/23 00:24:16 joerg Exp $ */
 /*     BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp   */
 
 /*
@@ -64,7 +64,7 @@
 #if 0
 static char sccsid[] = "@(#)inet.c     8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: inet6.c,v 1.73 2019/08/18 04:14:40 kamil Exp $");
+__RCSID("$NetBSD: inet6.c,v 1.74 2020/04/23 00:24:16 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -147,7 +147,6 @@
 #else
 struct tcpcb tcpcb;
 #endif
-struct socket sockb;
 
 char   *inet6name(const struct in6_addr *);
 void   inet6print(const struct in6_addr *, int, const char *);
@@ -283,8 +282,9 @@
 
 
 static struct kinfo_pcb *
-getpcblist_kmem(u_long off, const char *name, size_t *len) {
-
+getpcblist_kmem(u_long off, const char *name, size_t *len)
+{
+       struct socket sockb;
        struct inpcbtable table;
        struct inpcb_hdr *next, *prev;
        int istcp = strcmp(name, "tcp6") == 0;



Home | Main Index | Thread Index | Old Index