summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2022-03-17 01:32:39 +0100
committernorly <ny-git@enpas.org>2022-03-17 01:32:39 +0100
commit521a2bdc04a021a0e58bd093097b751951caf408 (patch)
tree42675a1c5e22cace3a36042fae8d4e70ee10e4dd /module
parent6cce55d96e2888876a17b841e21a7133c576d210 (diff)
Minor cleanups
Diffstat (limited to 'module')
-rw-r--r--module/elmcan.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index fd38475..a75ddf1 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -209,8 +209,8 @@ static void elm327_send_frame(struct elmcan *elm, struct can_frame *frame)
/* Schedule any necessary changes in ELM327's CAN configuration */
if (elm->can_frame_to_send.can_id != frame->can_id) {
/* Set the new CAN ID for transmission. */
- if ((frame->can_id & CAN_EFF_FLAG)
- ^ (elm->can_frame_to_send.can_id & CAN_EFF_FLAG)) {
+ if ((frame->can_id & CAN_EFF_FLAG) ^
+ (elm->can_frame_to_send.can_id & CAN_EFF_FLAG)) {
elm->can_config = (frame->can_id & CAN_EFF_FLAG
? 0
: ELM327_CAN_CONFIG_SEND_SFF)
@@ -469,7 +469,6 @@ static int elm327_parse_frame(struct elmcan *elm, size_t len)
frame->can_id = CAN_EFF_FLAG;
datastart = 14;
} else if (elm->rxbuf[3] == ' ' && elm->rxbuf[5] == ' ') {
- frame->can_id = 0;
datastart = 6;
} else {
/* This is not a well-formatted data line.