diff --git a/code/bngblaster/src/bbl_protocols.c b/code/bngblaster/src/bbl_protocols.c index c8c997aa..f7df506c 100644 --- a/code/bngblaster/src/bbl_protocols.c +++ b/code/bngblaster/src/bbl_protocols.c @@ -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; diff --git a/code/bngblaster/src/bbl_txq.c b/code/bngblaster/src/bbl_txq.c index a78dc676..13ce2d83 100644 --- a/code/bngblaster/src/bbl_txq.c +++ b/code/bngblaster/src/bbl_txq.c @@ -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; }