[PATCH phosphor-host-ipmid v4 3/4] Sensor5 hanging system IPL

OpenBMC Patches patches at stwcx.xyz
Fri Oct 23 05:41:17 AEDT 2015


From: Chris Austen <austenc at us.ibm.com>

---
 ipmisensor.C | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ipmisensor.C b/ipmisensor.C
index 568f4a4..1a40411 100644
--- a/ipmisensor.C
+++ b/ipmisensor.C
@@ -85,14 +85,14 @@ char *getfw02string(uint8_t b) {
 	int i = 0;
 	event_data_t *p = g_fwprogress02h;
 
-	do {
-
-		if ((p+i)->data == b)
+	while(p->data != 0xFF) {
+		if (p->data == b) {
 			break;
-		i++;
-	} while ((p+i)->data != 0xFF);
+		} 
+		p++;
+	}
 
-	return (p+i)->text;
+	return p->text;
 }
 //  The fw progress sensor contains some additional information that needs to be processed
 //  prior to calling the dbus code.  
-- 
2.6.0




More information about the openbmc mailing list