aboutsummaryrefslogtreecommitdiff
path: root/libsframe
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2023-06-27 11:55:59 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2023-06-27 12:01:56 -0700
commitde4879feca3af5d8a7c6a46a8deb1adc3c2c8c0e (patch)
treebe918041748712799c470e5df5a6d43162f6afdf /libsframe
parent49e4485cba2fa322a649b39c8a05dae8b421331d (diff)
downloadbinutils-de4879feca3af5d8a7c6a46a8deb1adc3c2c8c0e.zip
binutils-de4879feca3af5d8a7c6a46a8deb1adc3c2c8c0e.tar.gz
binutils-de4879feca3af5d8a7c6a46a8deb1adc3c2c8c0e.tar.bz2
libsframe: use uint8_t instead of unsigned char for abi_arch
Use uint8_t consistently for identifying ABI/arch in SFrame format. bfd/ * elf-sframe.c (_bfd_elf_merge_section_sframe): libsframe/ * sframe-dump.c (is_sframe_abi_arch_aarch64): Use uint8_t for local variable. * sframe.c (sframe_decoder_get_abi_arch): Update return type to uint8_t. (sframe_encoder_get_abi_arch): Likewise. include/ * sframe-api.h (sframe_decoder_get_abi_arch): Likewise. (sframe_encoder_get_abi_arch): Likewise.
Diffstat (limited to 'libsframe')
-rw-r--r--libsframe/sframe-dump.c6
-rw-r--r--libsframe/sframe.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 2491b43..37ce9d7 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -32,9 +32,9 @@ is_sframe_abi_arch_aarch64 (sframe_decoder_ctx *sfd_ctx)
{
bool aarch64_p = false;
- unsigned char abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
- if ((abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG)
- || (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE))
+ uint8_t abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
+ if (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG
+ || abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE)
aarch64_p = true;
return aarch64_p;
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index 8e9dc0a..2d7e4a4 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -931,13 +931,13 @@ sframe_decoder_get_hdr_size (sframe_decoder_ctx *ctx)
return sframe_get_hdr_size (dhp);
}
-/* Get the SFrame's abi/arch info given the decoder context CTX. */
+/* Get the SFrame's abi/arch info given the decoder context DCTX. */
-unsigned char
-sframe_decoder_get_abi_arch (sframe_decoder_ctx *ctx)
+uint8_t
+sframe_decoder_get_abi_arch (sframe_decoder_ctx *dctx)
{
sframe_header *sframe_header;
- sframe_header = sframe_decoder_get_header (ctx);
+ sframe_header = sframe_decoder_get_header (dctx);
return sframe_header->sfh_abi_arch;
}
@@ -1322,10 +1322,10 @@ sframe_encoder_get_hdr_size (sframe_encoder_ctx *encoder)
/* Get the abi/arch info from the SFrame encoder context ENCODER. */
-unsigned char
+uint8_t
sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder)
{
- unsigned char abi_arch = 0;
+ uint8_t abi_arch = 0;
sframe_header *ehp;
ehp = sframe_encoder_get_header (encoder);
if (ehp)