From 59fdf73a6329f3374fc227a0ee075258faf861e1 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 30 Dec 2005 16:28:06 +0000 Subject: - Avoid adding devices multiple times to the device list. - Avoid adding options multiple times to the option list. Based on a patch by: Matt Emmerton --- usr.sbin/config/mkmakefile.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.sbin/config/mkmakefile.c') diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 157cff6..655d7e9 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -310,7 +310,7 @@ read_file(char *fname) struct device *dp; struct opt *op; char *wd, *this, *compilewith, *depends, *clean, *warning; - int compile, match, nreqs, devfound, std, filetype, + int compile, match, nreqs, std, filetype, imp_rule, no_obj, before_depend, mandatory, nowerror; fp = fopen(fname, "r"); @@ -465,14 +465,11 @@ nextparam: nowerror = 1; goto nextparam; } - devfound = 0; /* XXX duplicate device entries */ STAILQ_FOREACH(dp, &dtab, d_next) if (eq(dp->d_name, wd)) { dp->d_done |= DEVDONE; - devfound = 1; + goto nextparam; } - if (devfound) - goto nextparam; if (mandatory) { printf("%s: mandatory device \"%s\" not found\n", fname, wd); -- cgit v1.1