The function should return <0 only if an error occured, but in two out of three
branches the initial status of -1 was not modified. This may have rendered the
sensors plugin unusable for some people.
}
else if (chip->bus == SENSORS_CHIP_NAME_BUS_DUMMY)
{
- snprintf (buf, buf_size, "%s-%s-%04x",
+ status = snprintf (buf, buf_size, "%s-%s-%04x",
chip->prefix,
chip->busname,
chip->addr);
}
else
{
- snprintf (buf, buf_size, "%s-i2c-%d-%02x",
+ status = snprintf (buf, buf_size, "%s-i2c-%d-%02x",
chip->prefix,
chip->bus,
chip->addr);