contrib: fix namespace leakage in spd_readdir

Declare the internal symbols alloc_dirstruct() and cache_dirstruct()
as static so they don't leak out into the global namespace.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debian-1.42.9
Theodore Ts'o 2013-01-21 17:19:50 -05:00
parent 0b64f50f71
commit c64929d9c3
1 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ static int ino_cmp(const void *a, const void *b)
return (i_a - i_b); return (i_a - i_b);
} }
struct dir_s *alloc_dirstruct(DIR *dir) static struct dir_s *alloc_dirstruct(DIR *dir)
{ {
struct dir_s *dirstruct; struct dir_s *dirstruct;
static pthread_mutexattr_t mutexattr; static pthread_mutexattr_t mutexattr;
@ -200,7 +200,7 @@ struct dir_s *alloc_dirstruct(DIR *dir)
return dirstruct; return dirstruct;
} }
void cache_dirstruct(struct dir_s *dirstruct) static void cache_dirstruct(struct dir_s *dirstruct)
{ {
struct dirent_s *ds, *dnew; struct dirent_s *ds, *dnew;
struct dirent64 *d; struct dirent64 *d;