diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2023-05-31 22:55:41 -0700 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2023-05-31 22:55:41 -0700 |
commit | a5ffdcafc76c3f77c1c05fabe1544e004e9ef358 (patch) | |
tree | 6108681ecb2c40c9f1d63b35a08403f74c993fb6 /libsframe | |
parent | ec2260af61501798d00e41c3180c63d25b11439c (diff) | |
download | gdb-a5ffdcafc76c3f77c1c05fabe1544e004e9ef358.zip gdb-a5ffdcafc76c3f77c1c05fabe1544e004e9ef358.tar.gz gdb-a5ffdcafc76c3f77c1c05fabe1544e004e9ef358.tar.bz2 |
libsframe: minor fixups in flip_fre related functions
libsframe/
* sframe.c (flip_fre_start_address): Remove unnecessary type
cast. Use uint16_t instead of unsigned short.
(flip_fre_stack_offsets): Likewise.
Diffstat (limited to 'libsframe')
-rw-r--r-- | libsframe/sframe.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libsframe/sframe.c b/libsframe/sframe.c index dadce2c..97b4910 100644 --- a/libsframe/sframe.c +++ b/libsframe/sframe.c @@ -221,30 +221,28 @@ sframe_header_sanity_check_p (sframe_header *hp) /* Flip the start address pointed to by FP. */ static void -flip_fre_start_address (char *fp, unsigned int fre_type) +flip_fre_start_address (char *addr, unsigned int fre_type) { - void *start = (void*)fp; if (fre_type == SFRAME_FRE_TYPE_ADDR2) { - unsigned short *start_addr = (unsigned short *)(start); + uint16_t *start_addr = (uint16_t *)addr; swap_thing (*start_addr); } else if (fre_type == SFRAME_FRE_TYPE_ADDR4) { - uint32_t *start_addr = (uint32_t *)(start); + uint32_t *start_addr = (uint32_t *)addr; swap_thing (*start_addr); } } static void -flip_fre_stack_offsets (char *fp, uint8_t offset_size, uint8_t offset_cnt) +flip_fre_stack_offsets (char *offsets, uint8_t offset_size, uint8_t offset_cnt) { int j; - void *offsets = (void *)fp; if (offset_size == SFRAME_FRE_OFFSET_2B) { - unsigned short *ust = (unsigned short *)offsets; + uint16_t *ust = (uint16_t *)offsets; for (j = offset_cnt; j > 0; ust++, j--) swap_thing (*ust); } |