summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/config.y
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-03 21:27:02 +0000
committerru <ru@FreeBSD.org>2005-11-03 21:27:02 +0000
commitf34bc61dc10e9f11d70f518d480ee36fec5cd801 (patch)
treee21be9b99261d368d9aea1ca95ba296436c9ab54 /usr.sbin/config/config.y
parent8c0e76dc339621ca6d36719b2f17f527b0f4a40e (diff)
downloadFreeBSD-src-f34bc61dc10e9f11d70f518d480ee36fec5cd801.zip
FreeBSD-src-f34bc61dc10e9f11d70f518d480ee36fec5cd801.tar.gz
Use the eq() macro for comparing strings (style), and remove a "break"
statement to null the effect of several identical "cpu" directives.
Diffstat (limited to 'usr.sbin/config/config.y')
-rw-r--r--usr.sbin/config/config.y9
1 files changed, 4 insertions, 5 deletions
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
OpenPOWER on IntegriCloud