From: Oliver Hartkopp Date: Sat, 24 May 2014 19:44:51 +0000 (+0200) Subject: candump: use UINT32_MAX define from stdint.h X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-utils.git/commitdiff_plain/53779e43eb7fa6b70266753bb8dbf2734b403587?hp=4a68366bac433d9e95fb74147d68d1386d62cc0a candump: use UINT32_MAX define from stdint.h Use the UINT32_MAX define from stdint.h instead of writing it into a comment. Signed-off-by: Oliver Hartkopp --- diff --git a/candump.c b/candump.c index b67f3f8..a4e80d5 100644 --- a/candump.c +++ b/candump.c @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -678,7 +679,7 @@ int main(int argc, char **argv) if (dropcnt[i] > last_dropcnt[i]) frames = dropcnt[i] - last_dropcnt[i]; else - frames = 4294967295U - last_dropcnt[i] + dropcnt[i]; /* 4294967295U == UINT32_MAX */ + frames = UINT32_MAX - last_dropcnt[i] + dropcnt[i]; if (silent != SILENT_ON) printf("DROPCOUNT: dropped %d CAN frame%s on '%s' socket (total drops %d)\n",