summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/dir.c
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2001-01-21 08:24:41 +0000
committerwill <will@FreeBSD.org>2001-01-21 08:24:41 +0000
commit9e75a55e4ba3ce9b7eec70c9fa00d439225321c5 (patch)
tree3097cea8ddb0d8ead53f36053c2949d7d4c5bdb1 /usr.bin/make/dir.c
parentdd1ea82faf371a2bb93353a5b494e8b04c429427 (diff)
downloadFreeBSD-src-9e75a55e4ba3ce9b7eec70c9fa00d439225321c5.zip
FreeBSD-src-9e75a55e4ba3ce9b7eec70c9fa00d439225321c5.tar.gz
Fix style(9) bug; use ISDOT[DOT,]() macro available in util.c by moving
it to make.h so both dir.c and util.c can use it, although bde didn't particularly like this part of the idea, IMO it's cleaner than it was. Submitted by: bde
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r--usr.bin/make/dir.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index f920731..0c16cc8 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1067,15 +1067,14 @@ Dir_AddDir (path, name)
}
#endif /* sun && d_ino */
- /* Skip the '.' and '..' entries by checking for them specifically
- * instead of assuming readdir() reuturns them in that order when
- * first going through a directory. This is needed for XFS over
- * NFS filesystems since SGI does not guarantee that these are the
- * first two entries returned from readdir().
+ /* Skip the '.' and '..' entries by checking for them
+ * specifically instead of assuming readdir() reuturns them in
+ * that order when first going through a directory. This is
+ * needed for XFS over NFS filesystems since SGI does not
+ * guarantee that these are * the first two entries returned
+ * from readdir().
*/
- if (dp->d_name[0] == '.' &&
- (dp->d_name[1] == NULL ||
- (dp->d_name[1] == '.' && dp->d_name[2] == NULL)))
+ if (ISDOT(dp->d_name) || ISDOTDOT(dp->d_name))
continue;
(void)Hash_CreateEntry(&p->files, dp->d_name, (Boolean *)NULL);
OpenPOWER on IntegriCloud