Skip to content

Commit

Permalink
refactor(linux_can): Use binding instead of magic nr
Browse files Browse the repository at this point in the history
Use `ARPHRD_CAN` binding instead of `280` value directly for checking
if network interface is a CAN interface.
  • Loading branch information
ardera committed Jul 18, 2023
1 parent b123003 commit e597541
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/linux_can/lib/src/platform_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ class PlatformInterface {
ffi.calloc.free(req);

return switch (socketAddressFamily) {
// TODO: Replace 280 with ARPHRD_CAN
280 => true,
ARPHRD_CAN => true,
_ => false,
};
}
Expand Down

0 comments on commit e597541

Please sign in to comment.