mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
Consistent arguments to sizeof().
In calls to functions taking a pointer 'p' and a length 'l': if a struct variable v is passed in for p, then also pass sizeof(v) for l.
This commit is contained in:
+1
-1
@@ -386,7 +386,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (FD_ISSET(s[i], &rdfs)) {
|
||||
|
||||
nbytes = read(s[i], &frame, sizeof(struct can_frame));
|
||||
nbytes = read(s[i], &frame, sizeof(frame));
|
||||
|
||||
if (nbytes < 0) {
|
||||
perror("read");
|
||||
|
||||
Reference in New Issue
Block a user