From 5fc637a54d79594dac5411ead00a08e868863bd6 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 30 May 2016 11:24:40 +0000 Subject: [PATCH] David Binderman in PR kern/51189: simplify loop conditions --- sys/kern/subr_optstr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_optstr.c b/sys/kern/subr_optstr.c index e2ee5259f0b3..06aba79b7793 100644 --- a/sys/kern/subr_optstr.c +++ b/sys/kern/subr_optstr.c @@ -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 -__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 #include @@ -51,7 +51,7 @@ optstr_get(const char *optstr, const char *key, char *buf, size_t bufsize) 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 char *key, char *buf, size_t bufsize) optstr++; /* And now skip until next word. */ - while (*optstr == ' ' && *optstr != '\0') + while (*optstr == ' ') optstr++; } }