summaryrefslogtreecommitdiffstats
path: root/ipmisensor.C
diff options
context:
space:
mode:
Diffstat (limited to 'ipmisensor.C')
-rw-r--r--ipmisensor.C12
1 files 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.
OpenPOWER on IntegriCloud