Fix bug due to ambiguous variable name.

This commit is contained in:
Ilim Ugur 2013-02-07 15:35:32 +02:00 committed by Giuseppe Scrivano
parent 5a0f05423a
commit c1a44a16ef
2 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2013-02-07 Ilim Ugur <ilimugur@gmail.com>
* metalink.c (parse_metalink): Rename `mlink' to 'm_link'.
2012-12-09 Giuseppe Scrivano <gscrivano@gnu.org>
* recur.c (retrieve_tree): Do not attempt to re-download a file if

View File

@ -65,7 +65,7 @@ parse_metalink(char *input_file)
metalink_checksum_t **checksums;
metalink_chunk_checksum_t *chunk_checksum;
metalink_piece_hash_t **piece_hashes;
mlink *mlink;
mlink *m_link;
err = metalink_parse_file (input_file, &metalink);
if(err != 0 || !metalink)
{
@ -78,11 +78,11 @@ parse_metalink(char *input_file)
return NULL;
}
mlink = malloc (sizeof(mlink));
mlink->identity = (metalink->identity ? xstrdup (metalink->identity) : NULL);
mlink->tags = (metalink->tags ? xstrdup (metalink->tags) : NULL);
mlink->files = NULL;
mlink->num_of_files = 0;
m_link = malloc (sizeof *m_link);
m_link->identity = (metalink->identity ? xstrdup (metalink->identity) : NULL);
m_link->tags = (metalink->tags ? xstrdup (metalink->tags) : NULL);
m_link->files = NULL;
m_link->num_of_files = 0;
for (files = metalink->files; *files; ++files)
{
@ -104,9 +104,9 @@ parse_metalink(char *input_file)
}
file = malloc(sizeof(mlink_file));
++(mlink->num_of_files);
file -> next = (mlink->files);
(mlink->files) = file;
++(m_link->num_of_files);
file -> next = (m_link->files);
(m_link->files) = file;
file->name = xstrdup ((*files)->name);
file->size = (*files)->size;
@ -196,7 +196,7 @@ parse_metalink(char *input_file)
}
metalink_delete(metalink);
return mlink;
return m_link;
}
/* Elect resouces so that only the URLs with type HTTP and FTP (i.e. the