Module Name:    src
Committed By:   martin
Date:           Mon May 30 11:24:40 UTC 2016

Modified Files:
        src/sys/kern: subr_optstr.c

Log Message:
David Binderman in PR kern/51189: simplify loop conditions


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_optstr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_optstr.c
diff -u src/sys/kern/subr_optstr.c:1.5 src/sys/kern/subr_optstr.c:1.6
--- src/sys/kern/subr_optstr.c:1.5	Mon Apr 28 20:24:04 2008
+++ src/sys/kern/subr_optstr.c	Mon May 30 11:24:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_optstr.c,v 1.5 2008/04/28 20:24:04 martin Exp $	*/
+/*	$NetBSD: subr_optstr.c,v 1.6 2016/05/30 11:24:40 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_optstr.c,v 1.5 2008/04/28 20:24:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_optstr.c,v 1.6 2016/05/30 11:24:40 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/optstr.h>
@@ -51,7 +51,7 @@ optstr_get(const char *optstr, const cha
 	found = false;
 
 	/* Skip any initial spaces until we find a word. */
-	while (*optstr == ' ' && *optstr != '\0')
+	while (*optstr == ' ')
 		optstr++;
 
 	/* Search for the given key within the option string. */
@@ -73,7 +73,7 @@ optstr_get(const char *optstr, const cha
 				optstr++;
 
 			/* And now skip until next word. */
-			while (*optstr == ' ' && *optstr != '\0')
+			while (*optstr == ' ')
 				optstr++;
 		}
 	}

Reply via email to