svn commit: r342363 - head/usr.sbin/config

Kyle Evans kevans at FreeBSD.org
Sat Dec 22 06:08:07 UTC 2018


Author: kevans
Date: Sat Dec 22 06:08:06 2018
New Revision: 342363
URL: https://svnweb.freebsd.org/changeset/base/342363

Log:
  config(8): Remove all instances of an option when opting out
  
  Quick follow-up to r342362: options can appear multiple times now, so
  clean up all of them as needed. For non-OPTIONS options, this has no effect
  since they're already de-duplicated.
  
  MFC after:	1 week
  X-MFC-With:	r342362

Modified:
  head/usr.sbin/config/config.y

Modified: head/usr.sbin/config/config.y
==============================================================================
--- head/usr.sbin/config/config.y	Sat Dec 22 06:02:34 2018	(r342362)
+++ head/usr.sbin/config/config.y	Sat Dec 22 06:08:06 2018	(r342363)
@@ -479,8 +479,7 @@ rmopt_schedule(struct opt_head *list, char *name)
 {
 	struct opt *op;
 
-	op = findopt(list, name);
-	if (op != NULL) {
+	while ((op = findopt(list, name)) != NULL) {
 		SLIST_REMOVE(list, op, opt, op_next);
 		free(op->op_name);
 		free(op);


More information about the svn-src-head mailing list