From 9dd03edf0e35584d837e06d137c6ed8523d48692 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Wed, 22 Oct 2014 02:29:09 +0200 Subject: [PATCH] Allow use of a null status argument. --- drivers/cc1101.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.43.0