Skip to content

Commit 0228015

Browse files
committed
cleaner
1 parent 1b1a18b commit 0228015

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opendbc/safety/safety/safety_gm.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,16 @@ static safety_config gm_init(uint16_t param) {
241241
#endif
242242
gm_pcm_cruise = (gm_hw == GM_CAM) && !gm_cam_long;
243243

244-
safety_config ret = BUILD_SAFETY_CFG(gm_rx_checks, GM_ASCM_TX_MSGS);
244+
safety_config ret;
245245
if (gm_hw == GM_CAM) {
246246
// FIXME: cppcheck thinks that gm_cam_long is always false. This is not true
247247
// if ALLOW_DEBUG is defined but cppcheck is run without ALLOW_DEBUG
248248
// cppcheck-suppress knownConditionTrueFalse
249249
ret = gm_cam_long ? BUILD_SAFETY_CFG(gm_rx_checks, GM_CAM_LONG_TX_MSGS) : BUILD_SAFETY_CFG(gm_rx_checks, GM_CAM_TX_MSGS);
250+
} else {
251+
ret = BUILD_SAFETY_CFG(gm_rx_checks, GM_ASCM_TX_MSGS);
250252
}
253+
251254
if (gm_ev) {
252255
SET_RX_CHECKS(gm_ev_rx_checks, ret);
253256
}

0 commit comments

Comments
 (0)