Hi,

here a little patch proposal for xargs command line.

Thanks.

Kind regards.
Index: xargs.c
===================================================================
RCS file: /cvs/src/usr.bin/xargs/xargs.c,v
retrieving revision 1.33
diff -u -p -r1.33 xargs.c
--- xargs.c	16 Oct 2017 13:10:50 -0000	1.33
+++ xargs.c	11 Jun 2018 10:05:23 -0000
@@ -198,7 +198,7 @@ main(int argc, char *argv[])
 	 * NULL.
 	 */
 	linelen = 1 + argc + nargs + 1;
-	if ((av = bxp = calloc(linelen, sizeof(char **))) == NULL)
+	if ((av = bxp = calloc(linelen, sizeof(char *))) == NULL)
 		err(1, NULL);
 
 	/*
@@ -438,7 +438,7 @@ prerun(int argc, char *argv[])
 	 * Allocate memory to hold the argument list, and
 	 * a NULL at the tail.
 	 */
-	tmp = calloc(argc + 1, sizeof(char**));
+	tmp = calloc(argc + 1, sizeof(char *));
 	if (tmp == NULL)
 		err(1, NULL);
 	tmp2 = tmp;

Reply via email to