From f34bc61dc10e9f11d70f518d480ee36fec5cd801 Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 3 Nov 2005 21:27:02 +0000 Subject: 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(-) (limited to 'usr.sbin/config/config.y') diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 6ec0e70..e8c53d5 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 -- cgit v1.1