From: Pierre Muller Date: Tue, 19 Apr 2011 12:57:37 +0000 (+0000) Subject: * xstormy16-tdep.c (xstormy16_push_dummy_call): Add local X-Git-Tag: sid-snapshot-20110501~121 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c6e1b0de23f49e732b0ce5ed4373b43ebeb401f;p=external%2Fbinutils.git * xstormy16-tdep.c (xstormy16_push_dummy_call): Add local variables to simplify code and avoid == operator at end of line as this is against GNU coding standards. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b758a71..c4a98be 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,4 +1,11 @@ 2011-04-19 Pierre Muller + Pedro Alves + + * xstormy16-tdep.c (xstormy16_push_dummy_call): Add local + variables to simplify code and avoid == operator at end of + line as this is against GNU coding standards. + +2011-04-19 Pierre Muller * solib-svr4.c (svr4_keep_data_in_core): Rename local variable lm_name to name_lm to avoid conflict with lm_name function. diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 53cbecd..bf32cbd 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -263,12 +263,13 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch, /* Put argument into registers wordwise. */ val = value_contents (args[i]); for (j = 0; j < typelen; j += xstormy16_reg_size) - regcache_cooked_write_unsigned (regcache, argreg++, - extract_unsigned_integer (val + j, - typelen - j == - 1 ? 1 : - xstormy16_reg_size, - byte_order)); + { + ULONGEST regval; + int size = (typelen - j == 1) ? 1 : xstormy16_reg_size; + + regval = extract_unsigned_integer (val + j, size, byte_order); + regcache_cooked_write_unsigned (regcache, argreg++, regval); + } } /* Align SP */