openhpi2 / openhpi_bug_test

0 stars 0 forks source link

undefined behavior in snmp_bc_utils.c #1845

Closed openhpi2 closed 8 years ago

openhpi2 commented 10 years ago

our compiler checks found a very weird code in snmp_bc.c my patch for this is:

Index: plugins/snmp_bc/snmp_bc_utils.c
===================================================================
--- plugins/snmp_bc/snmp_bc_utils.c.orig        2007-10-04 00:40:10.000000000 +0200
+++ plugins/snmp_bc/snmp_bc_utils.c     2014-07-21 17:36:43.971386421 +0200
@@ -314,7 +314,6 @@ SaErrorT snmp_bc_set_resource_add_oh_eve
        if (e->resource.ResourceCapabilities & SAHPI_CAPABILITY_FRU) {
                e->event.EventType = SAHPI_ET_HOTSWAP;
                e->event.EventDataUnion.HotSwapEvent.HotSwapState = 
-                       e->event.EventDataUnion.HotSwapEvent.HotSwapState = 
                                                res_info_ptr->cur_state;

        } else {
```~~

Reported by: darix
openhpi2 commented 10 years ago

Original comment by: dr_mohan

openhpi2 commented 10 years ago

Fixed in checkin #7584

Original comment by: dr_mohan

openhpi2 commented 10 years ago

Original comment by: dr_mohan