Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/net whitespace



details:   https://anonhg.NetBSD.org/src/rev/5306d7c6281a
branches:  trunk
changeset: 781389:5306d7c6281a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 03 15:32:18 2012 +0000

description:
whitespace

diffstat:

 tests/lib/libc/net/t_protoent.sh |  21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diffs (48 lines):

diff -r 7ea3587fba6f -r 5306d7c6281a tests/lib/libc/net/t_protoent.sh
--- a/tests/lib/libc/net/t_protoent.sh  Mon Sep 03 14:21:24 2012 +0000
+++ b/tests/lib/libc/net/t_protoent.sh  Mon Sep 03 15:32:18 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_protoent.sh,v 1.1 2011/01/12 17:32:27 pgoyette Exp $
+# $NetBSD: t_protoent.sh,v 1.2 2012/09/03 15:32:18 christos Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,29 +39,28 @@
        #  (3) prune duplicates
        #
        tr '\t' ' ' </etc/protocols | awk '
-               function add(key, name,      i, n, ar) {
+       function add(key, name, i, n, ar) {
                n = split(names[key], ar);
-               for (i=1; i<=n; i++) {
+               for (i = 1; i <= n; i++) {
                        if (name == ar[i]) {
-                       return;
+                               return;
                        }
                }
                delete ar;
                names[key] = names[key] " " name;
-               }
-
-               {
+       }
+       {
                sub("#.*", "", $0);
                gsub("  *", " ", $0);
-               if (NF==0) {
+               if (NF == 0) {
                        next;
                }
                add($2, $1, 0);
-               for (i=3; i<=NF; i++) {
+               for (i = 3; i <= NF; i++) {
                        add($2, $i, 1);
                }
-               }
-               END {
+       }
+       END {
                for (key in names) {
                        proto = key;
 



Home | Main Index | Thread Index | Old Index