Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ebg1223 committed May 26, 2023
1 parent e39b2a2 commit 603c1e4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions board/safety/safety_hyundai_canfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,14 @@ static AddrCheckStruct get_cruise_info_check(void){
}
}

static addr_checks build_canfd_addr_checks(void) {
AddrCheckStruct new_addresses[BASE_ADDR_CHECK_LEN + 1];

static addr_checks build_canfd_addr_checks(void) {
if(hyundai_longitudinal) {
return (addr_checks){base_addr_checks, BASE_ADDR_CHECK_LEN};
}

AddrCheckStruct new_addresses[BASE_ADDR_CHECK_LEN + 1];
memcpy(new_addresses, base_addr_checks, sizeof(base_addr_checks));

AddrCheckStruct cruise_info_check = get_cruise_info_check();
memcpy(&new_addresses[BASE_ADDR_CHECK_LEN], &cruise_info_check, sizeof(AddrCheckStruct));

return (addr_checks){new_addresses, BASE_ADDR_CHECK_LEN + 1};
}

Expand Down

0 comments on commit 603c1e4

Please sign in to comment.