This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7595

-- gerrit

commit ba97438d93c827c85c3246c2c2f1e9f33176ff5e
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Sun Apr 9 00:00:37 2023 +0200

    flash: with pointers, use NULL instead of 0
    
    Don't compare pointers with 0, use NULL when needed.
    Don't pass 0 ad pointer argument, pass NULL.
    
    Detected through 'sparse' tool.
    
    Change-Id: I118554fffde41c94cea9e1201ea941ff3c1ee762
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/flash/nand/lpc32xx.c b/src/flash/nand/lpc32xx.c
index 2c578d1b42..359b01cc46 100644
--- a/src/flash/nand/lpc32xx.c
+++ b/src/flash/nand/lpc32xx.c
@@ -1029,7 +1029,7 @@ static int lpc32xx_write_page_slc(struct nand_device 
*nand,
 
        LOG_DEBUG("SLC write page %" PRIx32 " data=%d, oob=%d, "
                "data_size=%" PRIu32 ", oob_size=%" PRIu32,
-               page, data != 0, oob != 0, data_size, oob_size);
+               page, data != NULL, oob != NULL, data_size, oob_size);
 
        target_mem_base = pworking_area->address;
        /*
diff --git a/src/flash/nor/msp432.c b/src/flash/nor/msp432.c
index d9b9695dfe..5e2935d02b 100644
--- a/src/flash/nor/msp432.c
+++ b/src/flash/nor/msp432.c
@@ -375,7 +375,7 @@ static int msp432_init(struct flash_bank *bank)
        buf_set_u32(reg_params[0].value, 0, 32, ALGO_STACK_POINTER_ADDR);
 
        /* Begin executing the flash helper algorithm */
-       retval = target_start_algorithm(target, 0, 0, 1, reg_params,
+       retval = target_start_algorithm(target, 0, NULL, 1, reg_params,
                                algo_entry_addr, 0, &msp432_bank->armv7m_info);
        destroy_reg_param(&reg_params[0]);
        if (retval != ERROR_OK) {
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index 3a78952efd..972686e3f3 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -1342,7 +1342,7 @@ COMMAND_HANDLER(stellaris_handle_recover_command)
         * cycle to recover.
         */
 
-       Jim_Eval_Named(CMD_CTX->interp, "catch { hla_command \"debug unlock\" 
}", 0, 0);
+       Jim_Eval_Named(CMD_CTX->interp, "catch { hla_command \"debug unlock\" 
}", NULL, 0);
        if (!strcmp(Jim_GetString(Jim_GetResult(CMD_CTX->interp), NULL), "0")) {
                retval = ERROR_OK;
                goto user_action;

-- 

Reply via email to