{
struct sam4_chip *chip;
- if (target == NULL)
+ if (!target)
return NULL;
chip = all_sam4_chips;
else
details++;
}
- if (details->name == NULL) {
+ if (!details->name) {
LOG_ERROR("SAM4 ChipID 0x%08x not found in table (perhaps you can ID this chip?)",
(unsigned int)(private->chip->cfg.CHIPID_CIDR));
/* Help the victim, print details about the chip */
int k = bank->size / 1024;
private = get_sam4_bank_private(bank);
- if (private == NULL)
+ if (!private)
return ERROR_FAIL;
command_print_sameline(cmd, "%s bank %d: %d kB at " TARGET_ADDR_FMT,
}
}
- if (bank->sectors == NULL) {
+ if (!bank->sectors) {
bank->sectors = calloc(private->nsectors, (sizeof((bank->sectors)[0])));
- if (bank->sectors == NULL) {
+ if (!bank->sectors) {
LOG_ERROR("No memory!");
return ERROR_FAIL;
}