diff options
author | ru <ru@FreeBSD.org> | 2005-11-25 22:25:34 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-11-25 22:25:34 +0000 |
commit | 1852a934be2adf2c0f31279d930c513b44f1eea1 (patch) | |
tree | bdbde0c018ad3f753fe3d13706c65f0b52477290 /usr.sbin/config/mkheaders.c | |
parent | 783a6188caee1cf238ccd9ddbfe869f7c3f71fa6 (diff) | |
download | FreeBSD-src-1852a934be2adf2c0f31279d930c513b44f1eea1.zip FreeBSD-src-1852a934be2adf2c0f31279d930c513b44f1eea1.tar.gz |
Clean some code that became obfuscated over the years:
Don't keep duplicate files in the files list just to
mark the device as "known" later. XXX: Since the
device list isn't unique (there can be two "device foo"
directives, as this the case with LINT+DEFAULTS), we
have to traverse it all to mark all copies of the same
device as "used", but this is not worse than it was.
Diffstat (limited to 'usr.sbin/config/mkheaders.c')
-rw-r--r-- | usr.sbin/config/mkheaders.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c index 9babe78..fd7f1b3 100644 --- a/usr.sbin/config/mkheaders.c +++ b/usr.sbin/config/mkheaders.c @@ -50,23 +50,10 @@ static const char rcsid[] = void headers(void) { - struct file_list *fl; struct device *dp; - int match; int errors; errors = 0; - STAILQ_FOREACH(fl, &ftab, f_next) { - if (fl->f_needs != 0) { - match = 0; - STAILQ_FOREACH(dp, &dtab, d_next) { - if (eq(dp->d_name, fl->f_needs)) { - match++; - dp->d_done |= DEVDONE; - } - } - } - } STAILQ_FOREACH(dp, &dtab, d_next) { if (!(dp->d_done & DEVDONE)) { warnx("Error: device \"%s\" is unknown", |