diff usr/src/cmd/svc/startd/startd.c @ 195:1bf388d71529

6298507 kernel options -s and -m milestone don't play nice
author dstaff
date Wed, 20 Jul 2005 16:35:35 -0700
parents 68f95e015346
children 8a8c5f225b1b
line wrap: on
line diff
--- a/usr/src/cmd/svc/startd/startd.c	Wed Jul 20 15:27:31 2005 -0700
+++ b/usr/src/cmd/svc/startd/startd.c	Wed Jul 20 16:35:35 2005 -0700
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -593,8 +593,8 @@
 	if (env_opts == NULL)
 		return (ret);
 
-	cp = strtok_r(env_opts, ",", &lasts);
-	while (cp != NULL) {
+	for (cp = strtok_r(env_opts, ",", &lasts); cp != NULL;
+	    cp = strtok_r(NULL, ",", &lasts)) {
 		if (strcmp(cp, "debug") == 0) {
 			st->st_boot_flags = STARTD_BOOT_VERBOSE;
 			st->st_log_flags = STARTD_LOG_DEBUG;
@@ -645,8 +645,6 @@
 		} else {
 			uu_warn("Unknown SMF option \"%s\".\n", cp);
 		}
-
-		cp = strtok_r(NULL, ",", &lasts);
 	}
 
 	return (ret);