From c1a44a16ef8f2c882751f24fc6ab32b5bbfde31f Mon Sep 17 00:00:00 2001 From: Ilim Ugur Date: Thu, 7 Feb 2013 15:35:32 +0200 Subject: [PATCH] Fix bug due to ambiguous variable name. --- src/ChangeLog | 4 ++++ src/metalink.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 706e5ec8..063212d1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-02-07 Ilim Ugur + + * metalink.c (parse_metalink): Rename `mlink' to 'm_link'. + 2012-12-09 Giuseppe Scrivano * recur.c (retrieve_tree): Do not attempt to re-download a file if diff --git a/src/metalink.c b/src/metalink.c index abe370e2..01e7bf4e 100644 --- a/src/metalink.c +++ b/src/metalink.c @@ -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