From: Kevin Locke Date: Fri, 23 Sep 2016 03:33:10 +0000 (-0600) Subject: configurator: Fix compiler warning with compare X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=563ec0870cee828240b9f2112f5bd31284e31448 configurator: Fix compiler warning with compare Visual Studio prints warning C4706 "assignment within conditional expression" when there is an assignment without a comparison in a conditional expression. Therefore, to silence the warning, add an explicit comparison. Signed-off-by: Kevin Locke Reviewed-by: David Gibson Signed-off-by: David Gibson --- diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index daa90ee3..e9ff5ef1 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -489,7 +489,7 @@ static bool run_test(const char *cmd, struct test *test) char *dep; /* Space-separated dependencies, could be ! for inverse. */ - while ((len = strcspn(deps, " "))) { + while ((len = strcspn(deps, " ")) != 0) { bool positive = true; if (deps[len]) { dep = strdup(deps);