Commit Graph

13 Commits (856d0a662a02dd2dc0b83a7ad1de9fd120e82c4b)

Author SHA1 Message Date
Rosen Penev f766174677
custom if statement reordering
It makes more sense to return before hitting else.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-12 23:48:38 -07:00
Rosen Penev b153fe3f35
clang-tidy: sort includes alphabetically
Found with llvm-include-order

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-12 23:28:58 -07:00
Rosen Penev 17a5fe6022
clang-tidy: do not use else after return
Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-12 23:28:22 -07:00
Oliver Hartkopp a4905ed7c8 fix timeval to ASCII unsigned value conversion
As reported by Oleksij Rempel here
https://github.com/linux-can/can-utils/issues/233#issuecomment-674818935
the representation of timeval timestamps are signed values which leads to
negative values on 32 bit machines addressing the year 2038 unix sec counter
overflow.

Fix the issue on 32 bit systems by converting the timeval values to unsigned
ASCII value representations.

Fixes: https://github.com/linux-can/can-utils/issues/234
Reported-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2020-08-18 12:51:35 +02:00
Gary Bisson 46895a41c5 Fix comparison type mismatch warnings
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
2020-05-28 20:54:37 +02:00
Alexander Gerasiov 4db63e4b55 isotpperf.c: Reformat help/usage output to be compatible with help2man.
Signed-off-by: Alexander Gerasiov <gq@debian.org>

Gbp-Pq: Name 0013-isotpperf.c-Reformat-help-usage-output-to-be-compati.patch
2020-04-27 08:20:09 +03:00
Fabrice Fontaine e9590b1ca7 fix include to find SIOCGSTAMP with latest kernel
In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
Instead it provides only SIOCGSTAMP_OLD.

The linux/sockios.h header now defines SIOCGSTAMP using either
SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
header file is not pulled so we get a build failure.

canlogserver.c: In function 'main':
canlogserver.c:404:21: error: 'SIOCGSTAMP' undeclared (first use in this function); did you mean 'SIOCGRARP'?
     if (ioctl(s[i], SIOCGSTAMP, &tv) < 0)
                     ^~~~~~~~~~
                     SIOCGRARP
canlogserver.c:404:21: note: each undeclared identifier is reported only once for each function it appears in

Fixes:
 - http://autobuild.buildroot.org/results/363de7d9bf433be8bc47ba4ee52ae0bb80fa9021

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-07-14 22:14:10 +02:00
Yegor Yefremov 7b7331976a Add SPDX identifiers
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-06-19 12:24:24 +02:00
Marc Kleine-Budde 002f8eba87 isotp: fix printf warning on 32 bit systems
Use "z" modifier to print sizeof() values.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-03-03 08:29:36 +01:00
Oliver Hartkopp e71816295b isotpperf: print link layer data length of measured PDU
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2015-02-23 10:37:13 +01:00
Oliver Hartkopp 7e1b18f756 isotpperf: display bitrate setting status in summary
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2015-02-23 10:22:59 +01:00
Oliver Hartkopp 97f64049ac isotpperf: fix printed FC STMin value
Additionally remove the already removed -f option from the help text.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2015-02-23 10:03:12 +01:00
Oliver Hartkopp c1ac5613fd can-utils: added isotpperf tool for performance measurements
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2015-02-04 10:17:38 +01:00