summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-03-22 13:21:47 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-03-22 13:21:47 +0100
commit3240a7318b44840bc6a1c29b929ec1dcc28c02d9 (patch)
treeb54936415d152844cc690afc1c3a742f037cdee3
parent42c8350cdd46d2939378b81fbbc359d3a6bfce4f (diff)
src/ntfs_udl.c: make some variables more locals
-rw-r--r--src/ntfs_udl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ntfs_udl.c b/src/ntfs_udl.c
index 4fec49a..071d6f0 100644
--- a/src/ntfs_udl.c
+++ b/src/ntfs_udl.c
@@ -367,9 +367,7 @@ static void get_parent_name(struct filename* name, ntfs_volume* vol)
static int get_filenames(struct ufile *file, ntfs_volume* vol)
{
ATTR_RECORD *rec;
- FILE_NAME_ATTR *attr;
ntfs_attr_search_ctx *ctx;
- struct filename *name;
int count = 0;
int space = 4;
@@ -381,6 +379,8 @@ static int get_filenames(struct ufile *file, ntfs_volume* vol)
return -1;
while ((rec = find_attribute(AT_FILE_NAME, ctx))) {
+ struct filename *name;
+ FILE_NAME_ATTR *attr;
/* We know this will always be resident. */
attr = (FILE_NAME_ATTR *) ((char *) rec + le16_to_cpu(rec->value_offset));
@@ -450,7 +450,6 @@ static int get_data(struct ufile *file, ntfs_volume *vol)
ATTR_RECORD *rec;
ntfs_attr_search_ctx *ctx;
int count = 0;
- struct data *data;
if (!file)
return -1;
@@ -460,6 +459,7 @@ static int get_data(struct ufile *file, ntfs_volume *vol)
return -1;
while ((rec = find_attribute(AT_DATA, ctx))) {
+ struct data *data;
data = (struct data *)calloc(1, sizeof(*data));
if (!data) {
log_error("ERROR: Couldn't allocate memory in get_data().\n");