Skip to content

Commit

Permalink
Fixed compiler warning declaration shadows a global declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Mar 1, 2016
1 parent efb67f7 commit 5305704
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/commons.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,13 @@ get_module_index (int module)
int
remove_module (GModule module)
{
int index = get_module_index (module);
if (index == -1)
int idx = get_module_index (module);
if (idx == -1)
return 1;

if (index < TOTAL_MODULES - 1)
memmove (&module_list[index], &module_list[index + 1],
((TOTAL_MODULES - 1) - index) * sizeof (module_list[0]));
if (idx < TOTAL_MODULES - 1)
memmove (&module_list[idx], &module_list[idx + 1],
((TOTAL_MODULES - 1) - idx) * sizeof (module_list[0]));
module_list[TOTAL_MODULES - 1] = -1;

return 0;
Expand Down

0 comments on commit 5305704

Please sign in to comment.