Use the eq() macro for comparing strings (style), and remove a "break"

statement to null the effect of several identical "cpu" directives.
This commit is contained in:
Ruslan Ermilov 2005-11-03 21:27:02 +00:00
parent a15aafd590
commit d3e15dbaa0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152024

View file

@ -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