Skip to content

Commit 780a6f9

Browse files
committed
Merge branch 'can-mode-fix' of https://github.com/marckleinebudde/microcom
2 parents c6d5e12 + d536e6e commit 780a6f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

can.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ static ssize_t can_write(struct ios_ops *ios, const void *buf, size_t count)
6060
if (err < 0)
6161
return err;
6262

63-
assert(err < count);
64-
buf += err;
65-
count -= err;
66-
ret += err;
63+
assert(err == sizeof(to_can));
64+
buf += loopcount;
65+
count -= loopcount;
66+
ret += loopcount;
6767
}
6868

6969
return ret;

0 commit comments

Comments
 (0)