From 92f91930172eec04f302898d2957e32f1d773348 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 31 Jul 2014 16:02:20 +0200 Subject: lndir.c: dont use d_namlen --- src/usr.bin/lndir/lndir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usr.bin/lndir/lndir.c b/src/usr.bin/lndir/lndir.c index a6f3044..bdc5e78 100644 --- a/src/usr.bin/lndir/lndir.c +++ b/src/usr.bin/lndir/lndir.c @@ -208,7 +208,7 @@ dodir(char *fn, struct stat *fs, struct stat *ts, int rel) *p++ = '/'; n_dirs = fs->st_nlink; while ((dp = readdir(df))) { - if (dp->d_namlen == 0 || dp->d_name[dp->d_namlen - 1] == '~' || + if (strlen(dp->d_name) == 0 || dp->d_name[strlen(dp->d_name) - 1] == '~' || strncmp(dp->d_name, ".#", 2) == 0) continue; for (cur = exceptions; cur != NULL; cur = cur->next) { -- cgit 1.4.1