svn commit: r344619 - stable/11/sys/arm/arm

Kyle Evans kevans at FreeBSD.org
Wed Feb 27 13:01:18 UTC 2019


Author: kevans
Date: Wed Feb 27 13:01:17 2019
New Revision: 344619
URL: https://svnweb.freebsd.org/changeset/base/344619

Log:
  MFC r336262: Fix machdep_boot.c
  
  A last minute change made this no longer compile. Pass the right arg
  and eliminate now-unused variables from the code.

Modified:
  stable/11/sys/arm/arm/machdep_boot.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/arm/machdep_boot.c
==============================================================================
--- stable/11/sys/arm/arm/machdep_boot.c	Wed Feb 27 07:55:53 2019	(r344618)
+++ stable/11/sys/arm/arm/machdep_boot.c	Wed Feb 27 13:01:17 2019	(r344619)
@@ -150,13 +150,11 @@ arm_print_kenv(void)
 static void
 cmdline_set_env(char *cmdline, const char *guard)
 {
-	char *cmdline_next;
-	size_t size, guard_len;
+	size_t guard_len;
 
-	size = strlen(cmdline);
 	/* Skip leading spaces. */
-	for (; isspace(*cmdline) && (size > 0); cmdline++)
-		size--;
+	while (isspace(*cmdline))
+		cmdline++;
 
 	/* Test and remove guard. */
 	if (guard != NULL && guard[0] != '\0') {
@@ -164,10 +162,9 @@ cmdline_set_env(char *cmdline, const char *guard)
 		if (strncasecmp(cmdline, guard, guard_len) != 0)
 			return;
 		cmdline += guard_len;
-		size -= guard_len;
 	}
 
-	boothowto |= boot_parse_cmdline();
+	boothowto |= boot_parse_cmdline(cmdline);
 }
 
 /*


More information about the svn-src-all mailing list