Searched hist:"360 f593bf03ddc7e130c49a949a21b307d0c5262" (Results 1 – 1 of 1) sorted by relevance
/openbmc/intel-ipmi-oem/include/ |
H A D | sdrutils.hpp | diff 360f593bf03ddc7e130c49a949a21b307d0c5262 Wed Nov 14 11:08:54 CST 2018 Jason M. Bills <jason.m.bills@linux.intel.com> Fix checking of string::npos in sensor type parsing
The current string parsing to get sensor type from the path does not correctly check for string::npos after the calls to rfind(). This change adds proper string::npos checking after each rfind() before the position is used.
Tested: Ran 'ipmitool sensor list' and confirmed that the sensor units are displayed properly.
Change-Id: If9a7113d105fdf7f4450a22d4b881cf2b5a9c090 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|