From d3e15dbaa0afafd2aac1e14c0fe2ecbd37bb5022 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 3 Nov 2005 21:27:02 +0000 Subject: [PATCH] Use the eq() macro for comparing strings (style), and remove a "break" statement to null the effect of several identical "cpu" directives. --- usr.sbin/config/config.y | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 6ec0e7068f8e..e8c53d564319 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -162,11 +162,10 @@ Config_spec: = { struct cputype *cp, *cp2; SLIST_FOREACH_SAFE(cp, &cputype, cpu_next, cp2) { - if (strcmp(cp->cpu_name, $2) != 0) - continue; - SLIST_REMOVE(&cputype, cp, cputype, cpu_next); - free(cp); - break; + if (eq(cp->cpu_name, $2)) { + SLIST_REMOVE(&cputype, cp, cputype, cpu_next); + free(cp); + } } } | OPTIONS Opt_list