mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
* Changes today consist just of some code hardening.
This commit is contained in:
@ -701,12 +701,16 @@ pke_fifo_fit(struct pke_fifo* fifo)
|
|||||||
new_qw = zalloc(new_length * sizeof(struct fifo_quadword*));
|
new_qw = zalloc(new_length * sizeof(struct fifo_quadword*));
|
||||||
ASSERT(new_qw != NULL);
|
ASSERT(new_qw != NULL);
|
||||||
|
|
||||||
|
/* copy over old contents, if any */
|
||||||
|
if(fifo->quadwords != NULL)
|
||||||
|
{
|
||||||
/* copy over old pointers to beginning of new block */
|
/* copy over old pointers to beginning of new block */
|
||||||
memcpy(new_qw, fifo->quadwords,
|
memcpy(new_qw, fifo->quadwords,
|
||||||
fifo->length * sizeof(struct fifo_quadword*));
|
fifo->length * sizeof(struct fifo_quadword*));
|
||||||
|
|
||||||
/* free old block */
|
/* free old block */
|
||||||
zfree(fifo->quadwords);
|
zfree(fifo->quadwords);
|
||||||
|
}
|
||||||
|
|
||||||
/* replace pointers & counts */
|
/* replace pointers & counts */
|
||||||
fifo->quadwords = new_qw;
|
fifo->quadwords = new_qw;
|
||||||
@ -1708,7 +1712,6 @@ pke_code_direct(struct pke_device* me, unsigned_4 pkecode)
|
|||||||
& fifo_data,
|
& fifo_data,
|
||||||
16);
|
16);
|
||||||
} /* write collected quadword */
|
} /* write collected quadword */
|
||||||
|
|
||||||
} /* GPUIF xfer loop */
|
} /* GPUIF xfer loop */
|
||||||
|
|
||||||
/* done */
|
/* done */
|
||||||
|
Reference in New Issue
Block a user