summaryrefslogtreecommitdiffstats
path: root/src/rfs_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-05-05 13:13:14 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-05-05 13:13:14 +0200
commit9d0ddd4ce3471d1f8c15845684df8c19b4876c7c (patch)
treef64678a1ce0a61b7847b980377d3b441704e89e6 /src/rfs_dir.c
parent8a36ff31fdfeee2ddbb3004f9157de7c3dbb42e4 (diff)
Limit the scope of several variables
Diffstat (limited to 'src/rfs_dir.c')
-rw-r--r--src/rfs_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rfs_dir.c b/src/rfs_dir.c
index 9c76fd2..70a02ce 100644
--- a/src/rfs_dir.c
+++ b/src/rfs_dir.c
@@ -429,7 +429,6 @@ static file_data_t *reiser_dir(disk_t *disk_car, const partition_t *partition, d
}
while (reiserfs_dir_read(dir, &entry))
{
- unsigned int thislen;
char name[MAX_NAME_LEN(DEFAULT_BLOCK_SIZE)];
reiserfs_object_t *entity;
strncpy(name,dir_data->current_directory,sizeof(name));
@@ -437,6 +436,7 @@ static file_data_t *reiser_dir(disk_t *disk_car, const partition_t *partition, d
strcat(name,entry.de_name);
if((entity=reiserfs_object_create(ls->current_fs,name,1)))
{
+ unsigned int thislen;
file_data_t *new_file=(file_data_t *)MALLOC(sizeof(*new_file));
thislen=(MAX_NAME_LEN(DEFAULT_BLOCK_SIZE)<DIR_NAME_LEN?MAX_NAME_LEN(DEFAULT_BLOCK_SIZE):DIR_NAME_LEN);
memcpy(new_file->name,entry.de_name,thislen);