diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdb/gmp-utils.c | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | binutils-users/simark/clang-format.zip binutils-users/simark/clang-format.tar.gz binutils-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/gmp-utils.c')
-rw-r--r-- | gdb/gmp-utils.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/gdb/gmp-utils.c b/gdb/gmp-utils.c index b9c9b49..f7edb67 100644 --- a/gdb/gmp-utils.c +++ b/gdb/gmp-utils.c @@ -68,15 +68,15 @@ void gdb_mpz::write (gdb::array_view<gdb_byte> buf, enum bfd_endian byte_order, bool unsigned_p) const { - this->safe_export - (buf, byte_order == BFD_ENDIAN_BIG ? 1 : -1 /* endian */, unsigned_p); + this->safe_export (buf, byte_order == BFD_ENDIAN_BIG ? 1 : -1 /* endian */, + unsigned_p); } /* See gmp-utils.h. */ void -gdb_mpz::safe_export (gdb::array_view<gdb_byte> buf, - int endian, bool unsigned_p) const +gdb_mpz::safe_export (gdb::array_view<gdb_byte> buf, int endian, + bool unsigned_p) const { gdb_assert (buf.size () > 0); @@ -112,12 +112,10 @@ gdb_mpz::safe_export (gdb::array_view<gdb_byte> buf, } if (mpz_cmp (val, lo.val) < 0 || mpz_cmp (val, hi.val) > 0) - error (_("Cannot export value %s as %zu-bits %s integer" - " (must be between %s and %s)"), - this->str ().c_str (), - max_usable_bits, - unsigned_p ? _("unsigned") : _("signed"), - lo.str ().c_str (), + error (_ ("Cannot export value %s as %zu-bits %s integer" + " (must be between %s and %s)"), + this->str ().c_str (), max_usable_bits, + unsigned_p ? _ ("unsigned") : _ ("signed"), lo.str ().c_str (), hi.str ().c_str ()); gdb_mpz exported_val (val); @@ -144,9 +142,9 @@ gdb_mpz::safe_export (gdb::array_view<gdb_byte> buf, copy the data over to BUF. */ size_t word_countp; - gdb::unique_xmalloc_ptr<void> exported - (mpz_export (NULL, &word_countp, -1 /* order */, buf.size () /* size */, - endian, 0 /* nails */, exported_val.val)); + gdb::unique_xmalloc_ptr<void> exported ( + mpz_export (NULL, &word_countp, -1 /* order */, buf.size () /* size */, + endian, 0 /* nails */, exported_val.val)); gdb_assert (word_countp == 1); @@ -169,8 +167,8 @@ gdb_mpq::get_rounded () const towards zero. */ gdb_mpz quotient, remainder; - mpz_fdiv_qr (quotient.val, remainder.val, - mpq_numref (abs_val.val), mpq_denref (abs_val.val)); + mpz_fdiv_qr (quotient.val, remainder.val, mpq_numref (abs_val.val), + mpq_denref (abs_val.val)); /* Multiply the remainder by 2, and see if it is greater or equal to abs_val's denominator. If yes, round to the next integer. */ |