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>
This commit is contained in:
Tiezhu Yang 2022-05-10 19:50:31 +08:00
parent 20c4eb4226
commit 2c3c88db12

View File

@ -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;