BSD 4_3_Reno release
[unix-history] / usr / src / usr.bin / finger / finger.c
index d92b4b1..7c08c04 100644 (file)
@@ -2,7 +2,22 @@
  * Copyright (c) 1989 The Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1989 The Regents of the University of California.
  * All rights reserved.
  *
- * %sccs.include.redist.c%
+ * This code is derived from software contributed to Berkeley by
+ * Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
@@ -12,7 +27,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)finger.c   5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)finger.c   5.21 (Berkeley) 6/24/90";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -133,7 +148,7 @@ userlist(argc, argv)
 {
        register i;
        register PERSON *pn;
 {
        register i;
        register PERSON *pn;
-       PERSON *nethead, **nettail;
+       PERSON *nethead;
        struct utmp user;
        struct passwd *pw;
        int dolocal, *used;
        struct utmp user;
        struct passwd *pw;
        int dolocal, *used;
@@ -145,18 +160,17 @@ userlist(argc, argv)
        }
 
        /* pull out all network requests */
        }
 
        /* pull out all network requests */
-       for (i = 0, dolocal = 0, nettail = &nethead; i < argc; i++) {
+       for (i = 0, dolocal = 0, nethead = NULL; i < argc; i++) {
                if (!index(argv[i], '@')) {
                        dolocal = 1;
                        continue;
                }
                pn = palloc();
                if (!index(argv[i], '@')) {
                        dolocal = 1;
                        continue;
                }
                pn = palloc();
-               *nettail = pn;
-               nettail = &pn->next;
+               pn->next = nethead;
+               nethead = pn;
                pn->name = argv[i];
                used[i] = -1;
        }
                pn->name = argv[i];
                used[i] = -1;
        }
-       *nettail = NULL;
 
        if (!dolocal)
                goto net;
 
        if (!dolocal)
                goto net;