fault/fm-common/sources
Erich Cordoba 47209218ac Avoid null check for reference in fm_snmp_util_gen_trap
As C++ references cannot be NULL, new compilers optimizes the code
assuming this condition. Therefore, in new compilers, from GCC 6 to
8 the fn_snmp_util_gen_trap will segfault trying to deference
data.entity_instance_id as the if (&data != NULL) will be always
optimized to be true.

Turns out that the case where SFmAlarmDataT is expected to be NULL
(or empty) is when the alarm type is WARM_START. So changing the if
statement to look for WARM_START instead of checking the null reference
seems to be a feasible solution.

Story: 2003498
Task: 24775

Change-Id: Ica07ec8d7ad009e1048f014b0a6440c76de09eef
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2018-08-22 23:35:29 -05:00
..
LICENSE StarlingX open source release updates 2018-05-31 07:36:00 -07:00
Makefile Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmAPI.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAPI.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAlarm.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAlarmUtils.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmAlarmUtils.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmConfig.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmConfig.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmConstants.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDb.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDb.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbAPI.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmDbAlarm.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbAlarm.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbEventLog.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbEventLog.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbUtils.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbUtils.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmEventSuppression.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmEventSuppression.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmFile.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmFile.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmLog.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmLog.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmMsg.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMsgServer.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmMsgServer.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMutex.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMutex.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmSnmpConstants.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmSnmpUtils.cpp Avoid null check for reference in fm_snmp_util_gen_trap 2018-08-22 23:35:29 -05:00
fmSnmpUtils.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmSocket.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmSocket.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmThread.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmThread.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmTime.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmTime.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fm_cli.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fm_db_sync_event_suppression.py Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fm_python_mod_main.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
setup.py Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00