* [PATCH] opcodes/loongarch: correct parse_loongarch_dis_option
@ 2022-08-24 2:29 Iru Cai
2022-08-30 7:15 ` liuzhensong
0 siblings, 1 reply; 3+ messages in thread
From: Iru Cai @ 2022-08-24 2:29 UTC (permalink / raw)
To: binutils; +Cc: liuzhensong
parse_loongarch_dis_option should return 0 when parsing a valid
option.
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] opcodes/loongarch: correct parse_loongarch_dis_option
2022-08-24 2:29 [PATCH] opcodes/loongarch: correct parse_loongarch_dis_option Iru Cai
@ 2022-08-30 7:15 ` liuzhensong
2022-08-31 1:49 ` Iru Cai
0 siblings, 1 reply; 3+ messages in thread
From: liuzhensong @ 2022-08-30 7:15 UTC (permalink / raw)
To: Iru Cai, binutils
在 2022/8/24 上午10:29, Iru Cai 写道:
> parse_loongarch_dis_option should return 0 when parsing a valid
> option.
> ---
> 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
The format of this patch seems not a unified diff output, can not be
patched directly. Do you mind remake?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] opcodes/loongarch: correct parse_loongarch_dis_option
2022-08-30 7:15 ` liuzhensong
@ 2022-08-31 1:49 ` Iru Cai
0 siblings, 0 replies; 3+ messages in thread
From: Iru Cai @ 2022-08-31 1:49 UTC (permalink / raw)
To: liuzhensong, binutils
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?
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-31 1:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 2:29 [PATCH] opcodes/loongarch: correct parse_loongarch_dis_option Iru Cai
2022-08-30 7:15 ` liuzhensong
2022-08-31 1:49 ` Iru Cai
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).