Skip to content

Commit

Permalink
boardd: be careful with paren order in assert
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Nov 27, 2021
1 parent a58d272 commit 50cd858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/boardd/panda.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void Panda::pack_can_buffer(const capnp::List<cereal::CanData>::Reader &can_data
}
auto can_data = cmsg.getDat();
uint8_t data_len_code = len_to_dlc(can_data.size());
assert(can_data.size() <= (hw_type == cereal::PandaState::PandaType::RED_PANDA) ? 64 : 8);
assert(can_data.size() <= ((hw_type == cereal::PandaState::PandaType::RED_PANDA) ? 64 : 8));
assert(can_data.size() == dlc_to_len[data_len_code]);

can_header header;
Expand Down

6 comments on commit 50cd858

@geohot
Copy link
Contributor Author

@geohot geohot commented on 50cd858 Nov 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know why this broke CI, I'm sure it's what was intended.

@geohot
Copy link
Contributor Author

@geohot geohot commented on 50cd858 Nov 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@briskspirit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, will be more careful!
p.s.: C3 device is out of storage for build cache I suppose, can’t see it from my phone.

@geohot
Copy link
Contributor Author

@geohot geohot commented on 50cd858 Nov 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted it, this change adds a check and the CI failure might be real

@briskspirit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check tomorrow morning what’s going on

@pd0wm
Copy link
Contributor

@pd0wm pd0wm commented on 50cd858 Nov 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/tmp was full on one of the C3s. Will rerun them. But the unittests were also failing.

Please sign in to comment.