aboutsummaryrefslogtreecommitdiff
path: root/gdb/loongarch-tdep.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-05-10 19:50:31 +0800
committerTiezhu Yang <yangtiezhu@loongson.cn>2022-05-10 22:25:53 +0800
commit2c3c88db125df810ff0209d4a1fbc49161b3d9cf (patch)
treecea0772d3f5889d18729b8cb43f767c7d8412b58 /gdb/loongarch-tdep.c
parent20c4eb4226997c0de0a47d5d4c6c2eed21ed9af4 (diff)
downloadgdb-2c3c88db125df810ff0209d4a1fbc49161b3d9cf.zip
gdb-2c3c88db125df810ff0209d4a1fbc49161b3d9cf.tar.gz
gdb-2c3c88db125df810ff0209d4a1fbc49161b3d9cf.tar.bz2
gdb: LoongArch: Use GDB style to check readbuf and writebuf
The GDB style is to write 'if (readbuf != nullptr)', and the same for writebuf. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdb/loongarch-tdep.c')
-rw-r--r--gdb/loongarch-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c
index 28f0409..8e74c9b 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;