obj-evax.c tidy
authorAlan Modra <amodra@gmail.com>
Thu, 12 Dec 2019 06:17:21 +0000 (16:47 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 12 Dec 2019 11:28:23 +0000 (21:58 +1030)
commit84bc4ba8168154fae0da7d56dcd11df0d4bc44f2
treeab68efb69511b8743faed531578826377b7b4ced
parent967354c3b9b0306785dde600ab6f851fe1418612
obj-evax.c tidy

This started out as fixing decode_16, which used a char to index a 256
byte decodings array.  When char is signed that could result in an out
of bounds array access.  The rest of the patch is for consistency and
just general cleanup.

* config/obj-evax.c (crc32, encode_32, encode_16, decode_16):
Remove unnecessary prototypes.
(number_of_codings): Delete, use ARRAY_SIZE instead throughout.
(codings, decodings): Make arrays of unsigned char.
(crc32): Use unsigned variables.  Delete unnecessary mask.
(encode_32, encode_16): Return unsigned char*, and make static
buffer an unsigned char array.
(decode_16): Make arg an unsigned char*.  Remove useless casts.
(shorten_identifier): Use unsigned char crc_chars.
(is_truncated_identifier): Make ptr an unsigned char*.
gas/ChangeLog
gas/config/obj-evax.c
This page took 0.025902 seconds and 4 git commands to generate.