mirror of
https://github.com/rtbrick/bngblaster.git
synced 2024-05-06 15:54:57 +00:00
fix minor valgrind issues
This commit is contained in:
@@ -59,7 +59,7 @@ _checksum(void *buf, ssize_t len)
|
||||
static uint32_t
|
||||
_fold(uint32_t sum)
|
||||
{
|
||||
while (sum >> 16) {
|
||||
while(sum >> 16) {
|
||||
sum = (sum & 0xffff) + (sum >> 16);
|
||||
}
|
||||
return sum;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
bool
|
||||
bbl_txq_init(bbl_txq_s *txq, uint16_t size)
|
||||
{
|
||||
txq->ring = malloc(size * sizeof(bbl_txq_slot_t));
|
||||
txq->ring = calloc(1, size * sizeof(bbl_txq_slot_t));
|
||||
if(!txq->ring) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user