Module Name:    src
Committed By:   ad
Date:           Sat Jul  2 20:50:26 UTC 2022

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

Log Message:
Cosmetic tweak.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/pkill/pkill.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/pkill/pkill.c
diff -u src/usr.bin/pkill/pkill.c:1.31 src/usr.bin/pkill/pkill.c:1.32
--- src/usr.bin/pkill/pkill.c:1.31	Tue Feb 21 13:09:56 2017
+++ src/usr.bin/pkill/pkill.c	Sat Jul  2 20:50:26 2022
@@ -1,7 +1,7 @@
-/*	$NetBSD: pkill.c,v 1.31 2017/02/21 13:09:56 kre Exp $	*/
+/*	$NetBSD: pkill.c,v 1.32 2022/07/02 20:50:26 ad Exp $	*/
 
 /*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * Copyright (c) 2002, 2022 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: pkill.c,v 1.31 2017/02/21 13:09:56 kre Exp $");
+__RCSID("$NetBSD: pkill.c,v 1.32 2022/07/02 20:50:26 ad Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -266,7 +266,7 @@ main(int argc, char **argv)
 	 * Allocate memory which will be used to keep track of the
 	 * selection.
 	 */
-	if ((selected = calloc((size_t)1, (size_t)nproc)) == NULL)
+	if ((selected = calloc(sizeof(*selected), (size_t)nproc)) == NULL)
 		err(STATUS_ERROR, "Cannot allocate memory for %d processes",
 		    nproc);
 

Reply via email to