Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
pull/7/head
Yegor Yefremov 2012-04-19 17:39:53 +02:00 committed by Oliver Hartkopp
parent ba9b18932a
commit 5d2964c5ff
1 changed files with 2 additions and 2 deletions

View File

@ -611,7 +611,7 @@ int main(int argc, char **argv)
return 1; return 1;
} }
if (nbytes < sizeof(struct can_frame)) { if ((size_t)nbytes < sizeof(struct can_frame)) {
fprintf(stderr, "read: incomplete CAN frame\n"); fprintf(stderr, "read: incomplete CAN frame\n");
return 1; return 1;
} }
@ -627,7 +627,7 @@ int main(int argc, char **argv)
if (nbytes < 0) { if (nbytes < 0) {
perror("bridge write"); perror("bridge write");
return 1; return 1;
} else if (nbytes < sizeof(struct can_frame)) { } else if ((size_t)nbytes < sizeof(struct can_frame)) {
fprintf(stderr,"bridge write: incomplete CAN frame\n"); fprintf(stderr,"bridge write: incomplete CAN frame\n");
return 1; return 1;
} }