openocd: fix simple cases of NULL comparison
[fw/openocd] / src / flash / nor / numicro.c
index e8e2d74a106801b5fb4edc8134c550fdbe5e3dec..ce3973b9f331a3764be399a1b8b886b018d51161 100644 (file)
@@ -1386,7 +1386,7 @@ static int numicro_writeblock(struct flash_bank *bank, const uint8_t *buffer,
        init_reg_param(&reg_params[2], "r2", 32, PARAM_OUT);    /* number of words to program */
 
        struct armv7m_common *armv7m = target_to_armv7m(target);
-       if (armv7m == NULL) {
+       if (!armv7m) {
                /* something is very wrong if armv7m is NULL */
                LOG_ERROR("unable to get armv7m target");
                return retval;