openocd: fix simple cases of NULL comparison
[fw/openocd] / src / target / armv7m.c
index a9a5a381d694541120aed3344bab601ad89208ac..ee05e47299a0ba22c3adc7ddbf6b983124c5dadc 100644 (file)
@@ -967,7 +967,7 @@ int armv7m_blank_check_memory(struct target *target,
                blocks_to_check = num_blocks;
 
        struct algo_block *params = malloc((blocks_to_check+1)*sizeof(struct algo_block));
-       if (params == NULL) {
+       if (!params) {
                retval = ERROR_FAIL;
                goto cleanup1;
        }