From: Yao Qi Date: Mon, 24 Apr 2017 20:29:12 +0000 (+0100) Subject: Use floatformat_totalsize_bytes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1ba30532c6de26a14404ab4919bb591e8da3eab;p=binutils-gdb.git Use floatformat_totalsize_bytes The code can be replaced by floatformat_totalsize_bytes. gdb: 2017-04-24 Yao Qi * doublest.c (convert_doublest_to_floatformat): Call floatformat_totalsize_bytes. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 28ae0a7717c..33dd53bb396 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-04-24 Yao Qi + + * doublest.c (convert_doublest_to_floatformat): Call + floatformat_totalsize_bytes. + 2017-04-22 Tom Tromey * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use diff --git a/gdb/doublest.c b/gdb/doublest.c index d9e1fc60c0f..e464177bcc7 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) {