target/target: Use boolean values for 'valid' flag
Change-Id: Ieaa25b9ef0997c0f75ddfb652325c1a9e53a8d8d Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/7959 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
This commit is contained in:
parent
59c4d35fa4
commit
f58b5ddaf2
|
@ -3139,9 +3139,9 @@ COMMAND_HANDLER(handle_reg_command)
|
|||
if ((CMD_ARGC == 1) || ((CMD_ARGC == 2) && !((CMD_ARGV[1][0] >= '0')
|
||||
&& (CMD_ARGV[1][0] <= '9')))) {
|
||||
if ((CMD_ARGC == 2) && (strcmp(CMD_ARGV[1], "force") == 0))
|
||||
reg->valid = 0;
|
||||
reg->valid = false;
|
||||
|
||||
if (reg->valid == 0) {
|
||||
if (!reg->valid) {
|
||||
int retval = reg->type->get(reg);
|
||||
if (retval != ERROR_OK) {
|
||||
LOG_ERROR("Could not read register '%s'", reg->name);
|
||||
|
|
Loading…
Reference in New Issue