From 53779e43eb7fa6b70266753bb8dbf2734b403587 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Sat, 24 May 2014 21:44:51 +0200 Subject: [PATCH] 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 --- candump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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", -- 2.39.2