aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/drivers/osbdm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jtag/drivers/osbdm.c')
-rw-r--r--src/jtag/drivers/osbdm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jtag/drivers/osbdm.c b/src/jtag/drivers/osbdm.c
index 93abd640..4faaa843 100644
--- a/src/jtag/drivers/osbdm.c
+++ b/src/jtag/drivers/osbdm.c
@@ -48,7 +48,7 @@ static struct sequence *queue_add_tail(struct queue *queue, int len)
}
struct sequence *next;
- next = (struct sequence *)malloc(sizeof(*next));
+ next = malloc(sizeof(*next));
if (next) {
next->tms = calloc(1, DIV_ROUND_UP(len, 8));
if (next->tms) {
@@ -98,7 +98,7 @@ static void queue_free(struct queue *queue)
static struct queue *queue_alloc(void)
{
- struct queue *queue = (struct queue *)malloc(sizeof(struct queue));
+ struct queue *queue = malloc(sizeof(*queue));
if (queue)
queue->head = NULL;
else
@@ -277,7 +277,7 @@ static int osbdm_swap(struct osbdm *osbdm, void *tms, void *tdi,
/* Copy TDO responce
*/
- uint8_t *buffer = (uint8_t *)osbdm->buffer + 4;
+ uint8_t *buffer = osbdm->buffer + 4;
for (int bit_idx = 0; bit_idx < length; ) {
int bit_count = length - bit_idx;
if (bit_count > 16)