Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [obv][commit] Eliminate single-use variable PARAM_LEN
@ 2012-09-14  7:05 Siddhesh Poyarekar
  2012-09-14  8:10 ` Jan Kratochvil
  0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2012-09-14  7:05 UTC (permalink / raw)
  To: gdb-patches

Hi,

I just committed a trivial commit to printcmd.c, replacing a single-use
variable with its value (TYPE_LENGTH).

http://sourceware.org/ml/gdb-cvs/2012-09/msg00065.html

regards,
Siddhesh

gdb/ChangeLog:

	* printcmd.c (ui_printf): Eliminate single-use variable
	PARAM_LEN.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [obv][commit] Eliminate single-use variable PARAM_LEN
  2012-09-14  7:05 [obv][commit] Eliminate single-use variable PARAM_LEN Siddhesh Poyarekar
@ 2012-09-14  8:10 ` Jan Kratochvil
  2012-09-14  8:29   ` Siddhesh Poyarekar
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2012-09-14  8:10 UTC (permalink / raw)
  To: Siddhesh Poyarekar; +Cc: gdb-patches

Hi Siddhesh,

On Fri, 14 Sep 2012 09:04:17 +0200, Siddhesh Poyarekar wrote:
> I just committed a trivial commit to printcmd.c, replacing a single-use
> variable with its value (TYPE_LENGTH).

FYI one should post the patch content for list readers convenience, not just
the reference.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2012-09/msg00065.html

--- src/gdb/ChangeLog	2012/09/14 00:54:57	1.14656
+++ src/gdb/ChangeLog	2012/09/14 07:00:37	1.14657
@@ -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>
 
--- src/gdb/printcmd.c	2012/09/11 21:26:16	1.211
+++ src/gdb/printcmd.c	2012/09/14 07:00:42	1.212
@@ -2267,7 +2267,6 @@
 
 	      /* 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 @@
 
 	      /* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [obv][commit] Eliminate single-use variable PARAM_LEN
  2012-09-14  8:10 ` Jan Kratochvil
@ 2012-09-14  8:29   ` Siddhesh Poyarekar
  0 siblings, 0 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2012-09-14  8:29 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

On Fri, 14 Sep 2012 10:10:24 +0200, Jan wrote:
> FYI one should post the patch content for list readers convenience,
> not just the reference.
> 

Will do the next time.

Thanks,
Siddhesh


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-14  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14  7:05 [obv][commit] Eliminate single-use variable PARAM_LEN Siddhesh Poyarekar
2012-09-14  8:10 ` Jan Kratochvil
2012-09-14  8:29   ` Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox