From: Iru Cai <vimacs.hacks@gmail.com>
To: liuzhensong <liuzhensong@loongson.cn>, binutils@sourceware.org
Subject: Re: [PATCH] opcodes/loongarch: correct parse_loongarch_dis_option
Date: Wed, 31 Aug 2022 09:49:28 +0800 [thread overview]
Message-ID: <9a19e936-a692-8996-93c7-cb872dc0f76c@gmail.com> (raw)
In-Reply-To: <be439b4f-4720-91fb-9b37-3030a2fe2b27@loongson.cn>
parse_loongarch_dis_option() should return 0 when parsing a valid
option, which makes parse_loongarch_dis_options() continue parsing
and free the xmalloc'd memory.
---
opcodes/loongarch-dis.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/opcodes/loongarch-dis.c b/opcodes/loongarch-dis.c
index 9dcf989d0df..51c1f64edb5 100644
--- a/opcodes/loongarch-dis.c
+++ b/opcodes/loongarch-dis.c
@@ -92,7 +92,10 @@ parse_loongarch_dis_option (const char *option)
loongarch_r_disname = loongarch_r_normal_name;
loongarch_f_disname = loongarch_f_normal_name;
}
- return -1;
+ else
+ return -1;
+
+ return 0;
}
static int
--
2.37.2
On 2022/8/30 15:15, liuzhensong wrote:
>
> The format of this patch seems not a unified diff output, can not be
> patched directly. Do you mind remake?
>
prev parent reply other threads:[~2022-08-31 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 2:29 Iru Cai
2022-08-30 7:15 ` liuzhensong
2022-08-31 1:49 ` Iru Cai [this message]
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=9a19e936-a692-8996-93c7-cb872dc0f76c@gmail.com \
--to=vimacs.hacks@gmail.com \
--cc=binutils@sourceware.org \
--cc=liuzhensong@loongson.cn \
/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).