svn commit: r292947 - head/sbin/reboot

Steven Hartland smh at FreeBSD.org
Wed Dec 30 14:57:44 UTC 2015


Author: smh
Date: Wed Dec 30 14:57:42 2015
New Revision: 292947
URL: https://svnweb.freebsd.org/changeset/base/292947

Log:
  Fix use of uninitialised Nflag
  
  Initialise Nflag to 0 preventing use of uninitialised value.
  
  Reported by:	uqs
  MFC after:	1 week
  X-MFC-With:	r292266
  Sponsored by:	Multiplay
  Differential Revision:	https://reviews.freebsd.org/D4449

Modified:
  head/sbin/reboot/reboot.c

Modified: head/sbin/reboot/reboot.c
==============================================================================
--- head/sbin/reboot/reboot.c	Wed Dec 30 14:54:08 2015	(r292946)
+++ head/sbin/reboot/reboot.c	Wed Dec 30 14:57:42 2015	(r292947)
@@ -76,7 +76,7 @@ main(int argc, char *argv[])
 		howto = RB_HALT;
 	} else
 		howto = 0;
-	lflag = nflag = qflag = 0;
+	lflag = nflag = qflag = Nflag = 0;
 	while ((ch = getopt(argc, argv, "dk:lNnpqr")) != -1)
 		switch(ch) {
 		case 'd':


More information about the svn-src-all mailing list