svn commit: r285008 - stable/9/usr.sbin/dconschat

Pedro F. Giffuni pfg at FreeBSD.org
Wed Jul 1 15:04:55 UTC 2015


Author: pfg
Date: Wed Jul  1 15:04:54 2015
New Revision: 285008
URL: https://svnweb.freebsd.org/changeset/base/285008

Log:
  MFC	284913:
  dconschat(8): Use NULL instead of 0 for the last argument in execl(3)
  
  Found while experimenting with the gcc sentinel attribute.

Modified:
  stable/9/usr.sbin/dconschat/dconschat.c

Modified: stable/9/usr.sbin/dconschat/dconschat.c
==============================================================================
--- stable/9/usr.sbin/dconschat/dconschat.c	Wed Jul  1 15:03:49 2015	(r285007)
+++ stable/9/usr.sbin/dconschat/dconschat.c	Wed Jul  1 15:04:54 2015	(r285008)
@@ -229,7 +229,7 @@ dconschat_fork_gdb(struct dcons_state *d
 		snprintf(buf, 256, "\n[fork %s]\n", com);
 		write(p->outfd, buf, strlen(buf));
 
-		execl("/bin/sh", "/bin/sh", "-c", com, 0);
+		execl("/bin/sh", "/bin/sh", "-c", com, NULL);
 
 		snprintf(buf, 256, "\n[fork failed]\n");
 		write(p->outfd, buf, strlen(buf));


More information about the svn-src-stable mailing list