1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 08:21:18 +01:00

drivers-lm75a: use sizeof array instead of reg_size

This commit is contained in:
Hinnerk van Bruinehsen 2014-09-11 19:04:20 +02:00 committed by René Kijewski
parent 218635027c
commit 26d3a94dff

View File

@ -133,10 +133,9 @@ static uint16_t lm75A_get_register_value(uint8_t i2c_interface,
bool status = false;
uint8_t rx_buff[reg_size];
i2c_clear_buffer(rx_buff, reg_size);
i2c_clear_buffer(rx_buff, sizeof(rx_buff));
if ((reg_size > 0) && (reg_size < 3)) {
status = i2c_read(i2c_interface, LM75A_ADDR, reg_addr, rx_buff,
reg_size);
status = i2c_read(i2c_interface, LM75A_ADDR, reg_addr, rx_buff, sizeof(rx_buff));
if (!status) { //Slave is not ready
puts(
"[lm75a_tempSensorI2C/lm75A_getConfigReg]: Slave is not\