Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/netstat Avoid global scope for variables only used l...



details:   https://anonhg.NetBSD.org/src/rev/bda7c7109ae2
branches:  trunk
changeset: 1009419:bda7c7109ae2
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Apr 23 00:23:31 2020 +0000

description:
Avoid global scope for variables only used locally

diffstat:

 usr.bin/netstat/atalk.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r f79c5afc3f19 -r bda7c7109ae2 usr.bin/netstat/atalk.c
--- a/usr.bin/netstat/atalk.c   Thu Apr 23 00:22:01 2020 +0000
+++ b/usr.bin/netstat/atalk.c   Thu Apr 23 00:23:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atalk.c,v 1.17 2019/08/18 04:14:40 kamil Exp $ */
+/*     $NetBSD: atalk.c,v 1.18 2020/04/23 00:23:31 joerg Exp $ */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from @(#)atalk.c       1.1 (Whistle) 6/6/96";
 #else
-__RCSID("$NetBSD: atalk.c,v 1.17 2019/08/18 04:14:40 kamil Exp $");
+__RCSID("$NetBSD: atalk.c,v 1.18 2020/04/23 00:23:31 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -63,9 +63,6 @@
 #include "netstat.h"
 #include "prog_ops.h"
 
-struct ddpcb    ddpcb;
-struct socket   sockb;
-
 static int first = 1;
 
 /*
@@ -230,6 +227,8 @@
 void
 atalkprotopr(u_long off, const char *name)
 {
+       struct ddpcb ddpcb;
+       struct socket sockb;
        struct ddpcb *next;
        struct ddpcb *initial;
        int width = 22;



Home | Main Index | Thread Index | Old Index