Ticket #3464: (compute_namelen): remove...

...since DIRENT_LENGTH_COMPUTED is always 1.
compute_namelen() returns without functional logic.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2015-05-10 17:32:12 +03:00 committed by Andrew Borodin
parent d2713adbc6
commit 156bf097e2
6 changed files with 0 additions and 19 deletions

View File

@ -100,7 +100,6 @@
/* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */ /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
#define NLENGTH(dirent) (strlen ((dirent)->d_name)) #define NLENGTH(dirent) (strlen ((dirent)->d_name))
#define DIRENT_LENGTH_COMPUTED 1
/* DragonFlyBSD doesn't provide MAXNAMLEN macro */ /* DragonFlyBSD doesn't provide MAXNAMLEN macro */
#ifndef MAXNAMLEN #ifndef MAXNAMLEN
@ -122,15 +121,4 @@
/*** inline functions ****************************************************************************/ /*** 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 #endif

View File

@ -448,7 +448,6 @@ vfs_s_readdir (void *data)
else else
vfs_die ("Null in structure-cannot happen"); vfs_die ("Null in structure-cannot happen");
compute_namelen (&dir.dent);
info->cur = g_list_next (info->cur); info->cur = g_list_next (info->cur);
return (void *) &dir; return (void *) &dir;

View File

@ -1061,7 +1061,6 @@ extfs_readdir (void *data)
g_strlcpy (dir.dent.d_name, (*info)->name, MC_MAXPATHLEN); g_strlcpy (dir.dent.d_name, (*info)->name, MC_MAXPATHLEN);
compute_namelen (&dir.dent);
*info = (*info)->next_in_dir; *info = (*info)->next_in_dir;
return (void *) &dir; return (void *) &dir;

View File

@ -149,7 +149,6 @@ sftpfs_readdir (void *data, GError ** mcerror)
return NULL; return NULL;
g_strlcpy (sftpfs_dirent.dent.d_name, mem, BUF_MEDIUM); g_strlcpy (sftpfs_dirent.dent.d_name, mem, BUF_MEDIUM);
compute_namelen (&sftpfs_dirent.dent);
return &sftpfs_dirent; return &sftpfs_dirent;
} }

View File

@ -939,8 +939,6 @@ smbfs_readdir (void *info)
g_strlcpy (dirent_dest, smbfs_info->current->text, MC_MAXPATHLEN); g_strlcpy (dirent_dest, smbfs_info->current->text, MC_MAXPATHLEN);
smbfs_info->current = smbfs_info->current->next; smbfs_info->current = smbfs_info->current->next;
compute_namelen (&smbfs_readdir_data.dent);
return &smbfs_readdir_data; return &smbfs_readdir_data;
} }

View File

@ -414,8 +414,6 @@ undelfs_readdir (void *vfs_info)
(long) delarray[readdir_ptr].ino, delarray[readdir_ptr].num_blocks); (long) delarray[readdir_ptr].ino, delarray[readdir_ptr].num_blocks);
readdir_ptr++; readdir_ptr++;
compute_namelen (&undelfs_readdir_data.dent);
return &undelfs_readdir_data; return &undelfs_readdir_data;
} }