aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2013-10-16 02:55:27 +0000
committerSergio Durigan Junior <sergiodj@redhat.com>2013-10-16 02:55:27 +0000
commitfd0a4d7688978ee30c27516619705e2ceccf00f9 (patch)
tree01decdabdd8eee1546da319fa3a3b0dd61cbdb5c /gdb/dwarf2read.c
parentd92f7ee31f8752821adac3785a8460d0f3d366ee (diff)
downloadgdb-fd0a4d7688978ee30c27516619705e2ceccf00f9.zip
gdb-fd0a4d7688978ee30c27516619705e2ceccf00f9.tar.gz
gdb-fd0a4d7688978ee30c27516619705e2ceccf00f9.tar.bz2
There were two functions who were calling "sizeof" twice.
The first one, dw2_get_real_path from gdb/dwarf2read.c, was actually making use of OBSTACK_CALLOC which already calls "sizeof" for its third argument. The second, download_tracepoint_1 from gdb/gdbserver/tracepoint.c, was explicitly calling "sizeof" inside another "sizeof". This patch fixed both functions. gdb/ChangeLog 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com> PR gdb/16014 * dwarf2read.c (dw2_get_real_path): Remove unnecessary call to sizeof. gdb/gdbserver/ChangeLog 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com> PR gdb/16014 * tracepoint.c (download_tracepoint_1): Remove unnecessary double call to sizeof.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index aa109e0..3974d0b 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3278,7 +3278,7 @@ dw2_get_real_path (struct objfile *objfile,
{
if (qfn->real_names == NULL)
qfn->real_names = OBSTACK_CALLOC (&objfile->objfile_obstack,
- qfn->num_file_names, sizeof (char *));
+ qfn->num_file_names, char *);
if (qfn->real_names[index] == NULL)
qfn->real_names[index] = gdb_realpath (qfn->file_names[index]);