aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-14 07:00:42 +0000
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-14 07:00:42 +0000
commitddd7a8e76d39c3c3ce8285d2eb5a41c649017a76 (patch)
treee3292389afb0fce131637df03b2edfc9dced24b1
parentd649a38e159d2cb937ba739d84654e7baf44ea71 (diff)
downloadgdb-ddd7a8e76d39c3c3ce8285d2eb5a41c649017a76.zip
gdb-ddd7a8e76d39c3c3ce8285d2eb5a41c649017a76.tar.gz
gdb-ddd7a8e76d39c3c3ce8285d2eb5a41c649017a76.tar.bz2
* printcmd.c (ui_printf): Eliminate single-use variable
PARAM_LEN.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/printcmd.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b90e81a..abd8d10 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-14 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * printcmd.c (ui_printf): Eliminate single-use variable
+ PARAM_LEN.
+
2012-09-14 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 9e8cd65..38c7b0e 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -2267,7 +2267,6 @@ ui_printf (char *arg, struct ui_file *stream)
/* Parameter data. */
struct type *param_type = value_type (val_args[i]);
- unsigned int param_len = TYPE_LENGTH (param_type);
struct gdbarch *gdbarch = get_type_arch (param_type);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -2329,8 +2328,8 @@ ui_printf (char *arg, struct ui_file *stream)
/* Conversion between different DFP types. */
if (TYPE_CODE (param_type) == TYPE_CODE_DECFLOAT)
- decimal_convert (param_ptr, param_len, byte_order,
- dec, dfp_len, byte_order);
+ decimal_convert (param_ptr, TYPE_LENGTH (param_type),
+ byte_order, dec, dfp_len, byte_order);
else
/* If this is a non-trivial conversion, just output 0.
A correct converted value can be displayed by explicitly