diff --git a/lib/fs.h b/lib/fs.h index d83be1663..40d29f4a3 100644 --- a/lib/fs.h +++ b/lib/fs.h @@ -100,7 +100,6 @@ /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */ #define NLENGTH(dirent) (strlen ((dirent)->d_name)) -#define DIRENT_LENGTH_COMPUTED 1 /* DragonFlyBSD doesn't provide MAXNAMLEN macro */ #ifndef MAXNAMLEN @@ -122,15 +121,4 @@ /*** inline functions ****************************************************************************/ -static inline void -compute_namelen (struct dirent *dent __attribute__ ((unused))) -{ -#ifdef DIRENT_LENGTH_COMPUTED - (void) dent; - return; -#else - dent->d_namlen = strlen (dent); -#endif -} - #endif diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index d2b5c7954..6d454a308 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -448,7 +448,6 @@ vfs_s_readdir (void *data) else vfs_die ("Null in structure-cannot happen"); - compute_namelen (&dir.dent); info->cur = g_list_next (info->cur); return (void *) &dir; diff --git a/src/vfs/extfs/extfs.c b/src/vfs/extfs/extfs.c index 2147a2e02..886c5afae 100644 --- a/src/vfs/extfs/extfs.c +++ b/src/vfs/extfs/extfs.c @@ -1061,7 +1061,6 @@ extfs_readdir (void *data) g_strlcpy (dir.dent.d_name, (*info)->name, MC_MAXPATHLEN); - compute_namelen (&dir.dent); *info = (*info)->next_in_dir; return (void *) &dir; diff --git a/src/vfs/sftpfs/dir.c b/src/vfs/sftpfs/dir.c index f691cb820..a6c1c6327 100644 --- a/src/vfs/sftpfs/dir.c +++ b/src/vfs/sftpfs/dir.c @@ -149,7 +149,6 @@ sftpfs_readdir (void *data, GError ** mcerror) return NULL; g_strlcpy (sftpfs_dirent.dent.d_name, mem, BUF_MEDIUM); - compute_namelen (&sftpfs_dirent.dent); return &sftpfs_dirent; } diff --git a/src/vfs/smbfs/smbfs.c b/src/vfs/smbfs/smbfs.c index 553566f10..83823ac11 100644 --- a/src/vfs/smbfs/smbfs.c +++ b/src/vfs/smbfs/smbfs.c @@ -939,8 +939,6 @@ smbfs_readdir (void *info) g_strlcpy (dirent_dest, smbfs_info->current->text, MC_MAXPATHLEN); smbfs_info->current = smbfs_info->current->next; - compute_namelen (&smbfs_readdir_data.dent); - return &smbfs_readdir_data; } diff --git a/src/vfs/undelfs/undelfs.c b/src/vfs/undelfs/undelfs.c index 2ad8be212..a69e7a627 100644 --- a/src/vfs/undelfs/undelfs.c +++ b/src/vfs/undelfs/undelfs.c @@ -414,8 +414,6 @@ undelfs_readdir (void *vfs_info) (long) delarray[readdir_ptr].ino, delarray[readdir_ptr].num_blocks); readdir_ptr++; - compute_namelen (&undelfs_readdir_data.dent); - return &undelfs_readdir_data; }