while (tap) {
uint32_t expected, expected_mask, ii;
- snprintf(expected_id, sizeof expected_id, "0x%08x",
+ snprintf(expected_id, sizeof(expected_id), "0x%08x",
(unsigned)((tap->expected_ids_cnt > 0)
? tap->expected_ids[0]
: 0));
(unsigned int)(expected_mask));
for (ii = 1; ii < tap->expected_ids_cnt; ii++) {
- snprintf(expected_id, sizeof expected_id, "0x%08x",
+ snprintf(expected_id, sizeof(expected_id), "0x%08x",
(unsigned) tap->expected_ids[ii]);
if (tap->ignore_version)
expected_id[2] = '*';
}
int field_size = tap->ir_length;
fields[i].num_bits = field_size;
- uint8_t *v = malloc(DIV_ROUND_UP(field_size, 8));
+ uint8_t *v = calloc(1, DIV_ROUND_UP(field_size, 8));
uint64_t value;
retval = parse_u64(CMD_ARGV[i * 2 + 1], &value);
.name = "irscan",
.handler = handle_irscan_command,
.mode = COMMAND_EXEC,
- .help = "Execute Instruction Register (DR) scan. The "
+ .help = "Execute Instruction Register (IR) scan. The "
"specified opcodes are put into each TAP's IR, "
"and other TAPs are put in BYPASS.",
.usage = "[tap_name instruction]* ['-endstate' state_name]",