public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <ibhagat@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] libsframe: minor fixups in flip_fre related functions
Date: Thu,  1 Jun 2023 05:58:36 +0000 (GMT)	[thread overview]
Message-ID: <20230601055836.42DB43858CDB@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a5ffdcafc76c3f77c1c05fabe1544e004e9ef358

commit a5ffdcafc76c3f77c1c05fabe1544e004e9ef358
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Wed May 31 22:55:41 2023 -0700

    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.

Diff:
---
 libsframe/sframe.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index dadce2c1262..97b49106e39 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);
     }

                 reply	other threads:[~2023-06-01  5:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230601055836.42DB43858CDB@sourceware.org \
    --to=ibhagat@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).