/* Extract error code from return packet */
error = (int)xds110_get_u32(&xds110.read_payload[0]);
done = true;
- if (SC_ERR_NONE != error)
+ if (error != SC_ERR_NONE)
LOG_DEBUG("XDS110: command 0x%02x returned error %d",
xds110.write_payload[0], error);
}
if (!is_read_request)
return false;
- if (DAP_AP == type) {
+ if (type == DAP_AP) {
/* Add bank address to register address for CMAPI call */
address |= bank;
}
/* Invalidate the RDBUFF cache */
xds110.use_rdbuff = false;
- if (DAP_AP == type) {
+ if (type == DAP_AP) {
/* Add bank address to register address for CMAPI call */
address |= bank;
/* Any write to an AP register invalidates the firmware's cache */
xds110.is_ap_dirty = true;
- } else if (DAP_DP_SELECT == address) {
+ } else if (address == DAP_DP_SELECT) {
/* Any write to the SELECT register invalidates the firmware's cache */
xds110.is_ap_dirty = true;
}
* If the debugger wrote to SELECT, cache the value
* to use to build the apNum and address values above
*/
- if ((DAP_DP == type) && (DAP_DP_SELECT == address))
+ if ((type == DAP_DP) && (address == DAP_DP_SELECT))
xds110.select = value;
}