ubsan: hppa: negation of -2147483648

Message ID 20200120095121.GD4433@bubble.grove.modra.org
State New
Headers show
Series
  • ubsan: hppa: negation of -2147483648
Related show

Commit Message

Alan Modra Jan. 20, 2020, 9:51 a.m.
* hppa-dis.c (fput_const): Remove useless cast.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/opcodes/hppa-dis.c b/opcodes/hppa-dis.c
index 3c15701716..93156da7cb 100644
--- a/opcodes/hppa-dis.c
+++ b/opcodes/hppa-dis.c
@@ -207,7 +207,7 @@  static void
 fput_const (unsigned num, disassemble_info *info)
 {
   if ((int) num < 0)
-    (*info->fprintf_func) (info->stream, "-%x", - (int) num);
+    (*info->fprintf_func) (info->stream, "-%x", -num);
   else
     (*info->fprintf_func) (info->stream, "%x", num);
 }