bfd: fix incorrect type used in sizeof

Noticed in passing that we used 'sizeof (char **)' when calculating
the size of a list of 'char *' pointers.  Of course, this isn't really
going to make a difference anywhere, but we may as well be correct.

There should be no user visible changes after this commit.

bfd/ChangeLog:

	* archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
	when calculating space for a string list.
This commit is contained in:
Andrew Burgess
2021-09-15 11:24:49 +01:00
parent 3d53d4603e
commit b4745472b6
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2021-09-15 Andrew Burgess <andrew.burgess@embecosm.com>
* archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
when calculating space for a string list.
2021-09-014 Cupertino Miranda <cmiranda@synopsys.com>
Claudiu Zissulescu <claziss@synopsys.com>

View File

@ -864,7 +864,7 @@ bfd_arch_list (void)
}
}
amt = (vec_length + 1) * sizeof (char **);
amt = (vec_length + 1) * sizeof (char *);
name_list = (const char **) bfd_malloc (amt);
if (name_list == NULL)
return NULL;