s390: Use safe string functions and length macros in s390-mkopc
authorJens Remus <jremus@linux.ibm.com>
Wed, 20 Dec 2023 10:17:39 +0000 (11:17 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Wed, 20 Dec 2023 10:50:32 +0000 (11:50 +0100)
commita3fa108623c51846ff019fbcba9f483897d6f5f7
tree509df2ed1078548ef3caccf98b854bef1aa8e706
parent730e7ddc243edff2755548c89dedac7293e5a5f6
s390: Use safe string functions and length macros in s390-mkopc

Use strncpy() and snprintf() instead of strcpy() and strcat(). Define
and use macros for string lengths, such as mnemonic, instruction
format, and instruction description.

This is a mechanical change, although some buffers have increased in
length by one character. This has been confirmed by verifying that the
generated opcode/s390-opc.tab is unchanged.

opcodes/
* s390-mkopc.c: Use strncpy() and strncat().

Suggested-by: Nick Clifton <nickc@redhat.com>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
opcodes/s390-mkopc.c