From: Nathael Pajani Date: Wed, 22 Oct 2014 00:29:09 +0000 (+0200) Subject: Allow use of a null status argument. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=9dd03edf0e35584d837e06d137c6ed8523d48692;p=soft%2Flpc122x%2Fcore Allow use of a null status argument. --- diff --git a/drivers/cc1101.c b/drivers/cc1101.c index b263a84..c49b7e4 100644 --- a/drivers/cc1101.c +++ b/drivers/cc1101.c @@ -276,7 +276,9 @@ int cc1101_receive_packet(uint8_t* buffer, uint8_t size, uint8_t* status) /* Get fifo state */ rx_status = cc1101_read_reg(CC1101_STATUS(rx_bytes)); - *status = rx_status; + if (status != NULL) { + *status = rx_status; + } /* Empty fifo ? */ if (rx_status == 0) {