CVS commit: src/usr.bin/finger

2021-10-30 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Oct 30 09:12:09 UTC 2021

Modified Files:
src/usr.bin/finger: finger.c

Log Message:
finger(1): convert malloc(x * y) to reallocarr


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/finger/finger.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/finger/finger.c
diff -u src/usr.bin/finger/finger.c:1.30 src/usr.bin/finger/finger.c:1.31
--- src/usr.bin/finger/finger.c:1.30	Mon Sep  5 00:40:28 2016
+++ src/usr.bin/finger/finger.c	Sat Oct 30 09:12:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: finger.c,v 1.30 2016/09/05 00:40:28 sevan Exp $	*/
+/*	$NetBSD: finger.c,v 1.31 2021/10/30 09:12:09 nia Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -52,7 +52,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)finger.c	8.5 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: finger.c,v 1.30 2016/09/05 00:40:28 sevan Exp $");
+__RCSID("$NetBSD: finger.c,v 1.31 2021/10/30 09:12:09 nia Exp $");
 #endif
 #endif /* not lint */
 
@@ -226,8 +226,10 @@ userlist(int argc, char **argv)
 	char **ap, **nargv, **np, **p;
 	struct utmpentry *ep;
 
-	if ((nargv = malloc((argc+1) * sizeof(char *))) == NULL ||
-	(used = calloc(argc, sizeof(int))) == NULL)
+	nargv = NULL;
+	if (reallocarr(, argc + 1, sizeof(char *)) != 0)
+		err(1, NULL);
+	if ((used = calloc(argc, sizeof(int))) == NULL)
 		err(1, NULL);
 
 	/* Pull out all network requests. */



CVS commit: src/usr.bin/finger

2021-10-30 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Oct 30 09:12:09 UTC 2021

Modified Files:
src/usr.bin/finger: finger.c

Log Message:
finger(1): convert malloc(x * y) to reallocarr


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/finger/finger.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/usr.bin/finger

2020-03-09 Thread Warner Losh
On Sun, Mar 8, 2020, 7:10 PM Luke Mewburn  wrote:

>
> On 20-01-30 23:50, Sevan Janiyan wrote:
>   | Module Name:src
>   | Committed By:   sevan
>   | Date:   Thu Jan 30 23:50:23 UTC 2020
>   |
>   | Modified Files:
>   | src/usr.bin/finger: finger.1
>   |
>   | Log Message:
>   | Drop url which is now invalid, see CSRG archive or mirrors on TUHS.org
> or
>   | svnweb.FreeBSD.org
>
> I think the URL was always invalid because ".ua" is not Australia
> (".au" is), and TUHS is maintained by Warren Toomey in Australia.
>
> Looks like TUHS is now at https://www.tuhs.org or ftp://www.tuhs.org
> but the I can't find a variation the link below any more.
>


Tuhs.org is the best place to send people. Full paths move around over the
years.

Warner


>   |
>   | To generate a diff of this commit:
>   | cvs rdiff -u -r1.19 -r1.20 src/usr.bin/finger/finger.1
>   |
>   | Please note that diffs are not public domain; they are subject to the
>   | copyright notices on the relevant files.
>   |
>
>   | Modified files:
>   |
>   | Index: src/usr.bin/finger/finger.1
>   | diff -u src/usr.bin/finger/finger.1:1.19
> src/usr.bin/finger/finger.1:1.20
>   | @@ -212,5 +212,4 @@ last login data base
>   |  The
>   |  .Nm
>   |  command appeared in
>   | -.Bx 2.0 :
>   | -.Lk ftp://ftp.tuhs.org.ua/PDP-11/Distributions/ucb/2bsd.tar.gz
>   | +.Bx 2.0
>   |
>
>


Re: CVS commit: src/usr.bin/finger

2020-03-08 Thread Luke Mewburn


On 20-01-30 23:50, Sevan Janiyan wrote:
  | Module Name:src
  | Committed By:   sevan
  | Date:   Thu Jan 30 23:50:23 UTC 2020
  | 
  | Modified Files:
  | src/usr.bin/finger: finger.1
  | 
  | Log Message:
  | Drop url which is now invalid, see CSRG archive or mirrors on TUHS.org or
  | svnweb.FreeBSD.org

I think the URL was always invalid because ".ua" is not Australia
(".au" is), and TUHS is maintained by Warren Toomey in Australia.

Looks like TUHS is now at https://www.tuhs.org or ftp://www.tuhs.org
but the I can't find a variation the link below any more.


  | 
  | To generate a diff of this commit:
  | cvs rdiff -u -r1.19 -r1.20 src/usr.bin/finger/finger.1
  | 
  | Please note that diffs are not public domain; they are subject to the
  | copyright notices on the relevant files.
  | 

  | Modified files:
  | 
  | Index: src/usr.bin/finger/finger.1
  | diff -u src/usr.bin/finger/finger.1:1.19 src/usr.bin/finger/finger.1:1.20
  | @@ -212,5 +212,4 @@ last login data base
  |  The
  |  .Nm
  |  command appeared in
  | -.Bx 2.0 :
  | -.Lk ftp://ftp.tuhs.org.ua/PDP-11/Distributions/ucb/2bsd.tar.gz
  | +.Bx 2.0
  |