Commit 95f8941e authored by Alessandro Rubini's avatar Alessandro Rubini

dev/eeprom.c: fix a sizeof() -- it is 4 in any case, though

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fef22531
...@@ -228,13 +228,13 @@ int8_t eeprom_phtrans(uint8_t i2cif, uint8_t i2c_addr, uint32_t * val, ...@@ -228,13 +228,13 @@ int8_t eeprom_phtrans(uint8_t i2cif, uint8_t i2c_addr, uint32_t * val,
if (write) { if (write) {
*val |= (1 << 31); *val |= (1 << 31);
if (eeprom_write(i2cif, i2c_addr, EE_BASE_CAL, (uint8_t *) val, if (eeprom_write(i2cif, i2c_addr, EE_BASE_CAL, (uint8_t *) val,
sizeof(val)) != sizeof(val)) sizeof(*val)) != sizeof(*val))
return EE_RET_I2CERR; return EE_RET_I2CERR;
else else
return 1; return 1;
} else { } else {
if (eeprom_read(i2cif, i2c_addr, EE_BASE_CAL, (uint8_t *) val, if (eeprom_read(i2cif, i2c_addr, EE_BASE_CAL, (uint8_t *) val,
sizeof(val)) != sizeof(val)) sizeof(*val)) != sizeof(*val))
return EE_RET_I2CERR; return EE_RET_I2CERR;
if (!(*val & (1 << 31))) if (!(*val & (1 << 31)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment