Use floatformat_totalsize_bytes

The code can be replaced by floatformat_totalsize_bytes.

gdb:

2017-04-24  Yao Qi  <yao.qi@linaro.org>

	* doublest.c (convert_doublest_to_floatformat): Call
	floatformat_totalsize_bytes.
This commit is contained in:
Yao Qi 2017-04-24 21:29:12 +01:00
parent e662f84f5d
commit e1ba30532c
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2017-04-24 Yao Qi <yao.qi@linaro.org>
* doublest.c (convert_doublest_to_floatformat): Call
floatformat_totalsize_bytes.
2017-04-22 Tom Tromey <tom@tromey.com> 2017-04-22 Tom Tromey <tom@tromey.com>
* mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use

View File

@ -360,8 +360,7 @@ convert_doublest_to_floatformat (const struct floatformat *fmt,
uto = newto; uto = newto;
memcpy (&dfrom, from, sizeof (dfrom)); memcpy (&dfrom, from, sizeof (dfrom));
memset (uto, 0, (fmt->totalsize + FLOATFORMAT_CHAR_BIT - 1) memset (uto, 0, floatformat_totalsize_bytes (fmt));
/ FLOATFORMAT_CHAR_BIT);
if (fmt->split_half) if (fmt->split_half)
{ {