]> rtime.felk.cvut.cz Git - can-utils.git/blobdiff - candump.c
isotp: added support for separate extended address in rx path
[can-utils.git] / candump.c
index b67f3f8ecdf460b324a5e6fc60930fbec1197098..a1146f55c8ad6aaabe93c6ac3a90a4fe6325ed18 100644 (file)
--- a/candump.c
+++ b/candump.c
@@ -43,6 +43,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <unistd.h>
 #include <string.h>
 #include <signal.h>
@@ -673,12 +674,7 @@ int main(int argc, char **argv)
                                /* check for (unlikely) dropped frames on this specific socket */
                                if (dropcnt[i] != last_dropcnt[i]) {
 
-                                       __u32 frames;
-
-                                       if (dropcnt[i] > last_dropcnt[i])
-                                               frames = dropcnt[i] - last_dropcnt[i];
-                                       else
-                                               frames = 4294967295U - last_dropcnt[i] + dropcnt[i]; /* 4294967295U == UINT32_MAX */
+                                       __u32 frames = dropcnt[i] - last_dropcnt[i];
 
                                        if (silent != SILENT_ON)
                                                printf("DROPCOUNT: dropped %d CAN frame%s on '%s' socket (total drops %d)\n",