commit | 360f593bf03ddc7e130c49a949a21b307d0c5262 | [log] [tgz] |
---|---|---|
author | Jason M. Bills <jason.m.bills@linux.intel.com> | Wed Nov 14 09:08:54 2018 -0800 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Mon Dec 03 16:46:41 2018 +0000 |
tree | a8f154fa7cf16a46a779f2a753030d58a70320c9 | |
parent | 6e056419708c2100424b997cc4e047e3f6ce6b81 [diff] |
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>