target/embeddedice: Use 'bool' data type 64/4964/2
authorMarc Schink <openocd-dev@marcschink.de>
Tue, 26 Feb 2019 13:08:18 +0000 (14:08 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Wed, 6 Mar 2019 16:15:56 +0000 (16:15 +0000)
Change-Id: I0f237e0769786aa560d1a472a71499d3856ab25c
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4964
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/embeddedice.c

index 7232ef1..61ee8bb 100644 (file)
@@ -205,8 +205,8 @@ struct reg_cache *embeddedice_build_reg_cache(struct target *target,
        for (i = 0; i < num_regs; i++) {
                reg_list[i].name = eice_regs[i].name;
                reg_list[i].size = eice_regs[i].width;
-               reg_list[i].dirty = 0;
-               reg_list[i].valid = 0;
+               reg_list[i].dirty = false;
+               reg_list[i].valid = false;
                reg_list[i].value = calloc(1, 4);
                reg_list[i].arch_info = &arch_info[i];
                reg_list[i].type = &eice_reg_type;
@@ -470,8 +470,8 @@ void embeddedice_set_reg(struct reg *reg, uint32_t value)
        embeddedice_write_reg(reg, value);
 
        buf_set_u32(reg->value, 0, reg->size, value);
-       reg->valid = 1;
-       reg->dirty = 0;
+       reg->valid = true;
+       reg->dirty = false;
 
 }