* printcmd.c (ui_printf): Eliminate single-use variable
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 14 Sep 2012 07:00:42 +0000 (07:00 +0000)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 14 Sep 2012 07:00:42 +0000 (07:00 +0000)
PARAM_LEN.

gdb/ChangeLog
gdb/printcmd.c

index b90e81af1afb811c7a4c3e3478fe70a32cef5dc9..abd8d104cb967f1925868c9cb23f7da1afde8b51 100644 (file)
@@ -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>
 
index 9e8cd659cad25071ba9499a7bba2353649227a94..38c7b0ee67dde618e5004856dbb8ad6b5f199da9 100644 (file)
@@ -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