From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: gdb-patches@sourceware.org
Subject: [COMMITTED PATCH] gdb: LoongArch: Use GDB style to check readbuf and writebuf
Date: Tue, 10 May 2022 22:27:59 +0800 [thread overview]
Message-ID: <20220510142759.5627-1-yangtiezhu@loongson.cn> (raw)
The GDB style is to write 'if (readbuf != nullptr)', and the same for
writebuf.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
gdb/loongarch-tdep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c
index 28f04094f64..8e74c9b779d 100644
--- a/gdb/loongarch-tdep.c
+++ b/gdb/loongarch-tdep.c
@@ -269,9 +269,9 @@ loongarch_return_value (struct gdbarch *gdbarch, struct value *function,
}
/* Extract the return value from the register where it was stored. */
- if (readbuf)
+ if (readbuf != nullptr)
regcache->raw_read_part (regnum, 0, len, readbuf);
- if (writebuf)
+ if (writebuf != nullptr)
regcache->raw_write_part (regnum, 0, len, writebuf);
return RETURN_VALUE_REGISTER_CONVENTION;
--
2.27.0
reply other threads:[~2022-05-10 14:28 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=20220510142759.5627-1-yangtiezhu@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=gdb-patches@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).