LOG_DEBUG("-");
- while (breakpoint != NULL) {
+ while (breakpoint) {
if (breakpoint->set == 0)
esirisc_add_breakpoint(target, breakpoint);
LOG_DEBUG("-");
- while (watchpoint != NULL) {
+ while (watchpoint) {
if (watchpoint->set == 0)
esirisc_add_watchpoint(target, watchpoint);
if (handle_breakpoints) {
breakpoint = breakpoint_find(target, address);
- if (breakpoint != NULL)
+ if (breakpoint)
esirisc_remove_breakpoint(target, breakpoint);
}
case EID_INST_BREAKPOINT:
breakpoint = breakpoint_find(target,
buf_get_u32(esirisc->epc->value, 0, esirisc->epc->size));
- target->debug_reason = (breakpoint != NULL) ?
+ target->debug_reason = (breakpoint) ?
DBG_REASON_BREAKPOINT : DBG_REASON_DBGRQ;
break;
struct jtag_tap *tap = target->tap;
struct esirisc_common *esirisc;
- if (tap == NULL)
+ if (!tap)
return ERROR_FAIL;
if (tap->ir_length != INSTR_LENGTH) {
}
esirisc = calloc(1, sizeof(struct esirisc_common));
- if (esirisc == NULL)
+ if (!esirisc)
return ERROR_FAIL;
esirisc->target = target;