aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-04-24 21:29:12 +0100
committerYao Qi <yao.qi@linaro.org>2017-04-24 21:29:12 +0100
commite1ba30532c6de26a14404ab4919bb591e8da3eab (patch)
tree2bc014878a0224221e74bb18dd3d08ccc1b3548a /gdb/doublest.c
parente662f84f5d6d014746550ce3d3f623583c043ff0 (diff)
downloadgdb-e1ba30532c6de26a14404ab4919bb591e8da3eab.zip
gdb-e1ba30532c6de26a14404ab4919bb591e8da3eab.tar.gz
gdb-e1ba30532c6de26a14404ab4919bb591e8da3eab.tar.bz2
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.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r--gdb/doublest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c
index d9e1fc6..e464177 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -360,8 +360,7 @@ convert_doublest_to_floatformat (const struct floatformat *fmt,
uto = newto;
memcpy (&dfrom, from, sizeof (dfrom));
- memset (uto, 0, (fmt->totalsize + FLOATFORMAT_CHAR_BIT - 1)
- / FLOATFORMAT_CHAR_BIT);
+ memset (uto, 0, floatformat_totalsize_bytes (fmt));
if (fmt->split_half)
{