]> rtime.felk.cvut.cz Git - sojka/can-utils.git/blobdiff - candump.c
Update includes to Linux 3.6 with CAN FD support.
[sojka/can-utils.git] / candump.c
index 5ba9431393fc8ef991963dd1a96e85d601c3c078..ac51192354b06d76a91d4b4fcbd08ed5e80f9401 100644 (file)
--- a/candump.c
+++ b/candump.c
@@ -611,7 +611,7 @@ int main(int argc, char **argv)
                                        return 1;
                                }
 
-                               if (nbytes < sizeof(struct can_frame)) {
+                               if ((size_t)nbytes < sizeof(struct can_frame)) {
                                        fprintf(stderr, "read: incomplete CAN frame\n");
                                        return 1;
                                }
@@ -627,7 +627,7 @@ int main(int argc, char **argv)
                                        if (nbytes < 0) {
                                                perror("bridge write");
                                                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");
                                                return 1;
                                        }