summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-30 16:28:06 +0000
committerru <ru@FreeBSD.org>2005-12-30 16:28:06 +0000
commit59fdf73a6329f3374fc227a0ee075258faf861e1 (patch)
tree88ec37e8c7a70a624495559a2639d280f195a656 /usr.sbin/config/mkmakefile.c
parent9d1801a10554429dd1cfce2268b2f14d02e25509 (diff)
downloadFreeBSD-src-59fdf73a6329f3374fc227a0ee075258faf861e1.zip
FreeBSD-src-59fdf73a6329f3374fc227a0ee075258faf861e1.tar.gz
- 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 <matt@gsicomp.on.ca>
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c7
1 files changed, 2 insertions, 5 deletions
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);
OpenPOWER on IntegriCloud