Fix Subaru init parameter MISRA compliance

Normalize a same-type local copy instead of modifying the input parameter.
Existing safety logic and all 34 paired firmware artifacts remain byte-identical.
Validated 67 debug and 67 release native cases; refresh source inventory receipt.
This commit is contained in:
Dom
2026-10-29 20:40:23 -05:00
parent 075d5c0ffe
commit b817c3c26e
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -286,7 +286,8 @@ static bool subaru_tx_hook(const CANPacket_t *msg) {
return tx;
}
static safety_config subaru_init(uint16_t param) {
static safety_config subaru_init(uint16_t raw_param) {
uint16_t param = raw_param;
const bool impreza_main = (param == 4096U) || (param == 4104U) || (param == 4608U) || (param == 4616U);
if (impreza_main) {
param &= ~4096U;
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "1d437e843577abf8819f1adfb6b0769fcc66304fcb08098db56d98386dff0d6a", "schema_version": 1}
{"protected_inventory_sha256": "ce4eae51b36b92783f62b76b09390ed338405f5e80c900d471aa793832da9b46", "schema_version": 1}