diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2013-10-16 02:55:27 +0000 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2013-10-16 02:55:27 +0000 |
commit | fd0a4d7688978ee30c27516619705e2ceccf00f9 (patch) | |
tree | 01decdabdd8eee1546da319fa3a3b0dd61cbdb5c /gdb/gdbserver | |
parent | d92f7ee31f8752821adac3785a8460d0f3d366ee (diff) | |
download | gdb-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/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 3138f47..4f15cfb 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com> + + PR gdb/16014 + * tracepoint.c (download_tracepoint_1): Remove unnecessary double + call to sizeof. + 2013-10-02 Pedro Alves <palves@redhat.com> * server.c (process_serial_event): Don't output "GDBserver diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 3288a13..ea1a8a1 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -6023,7 +6023,7 @@ download_tracepoint_1 (struct tracepoint *tpoint) if (ipa_action != 0) write_inferior_data_ptr - (actions_array + i * sizeof (sizeof (*tpoint->actions)), + (actions_array + i * sizeof (*tpoint->actions), ipa_action); } } |