cansend: convert towards kernel coding style

pull/489/head
Marc Kleine-Budde 2023-11-25 19:01:04 +01:00
parent c41f9cb21b
commit 82be1b348b
1 changed files with 7 additions and 5 deletions

View File

@ -56,7 +56,7 @@
#include "lib.h"
void print_usage(char *prg)
static void print_usage(char *prg)
{
fprintf(stderr, "%s - send CAN-frames via CAN_RAW sockets.\n", prg);
fprintf(stderr, "\nUsage: %s <device> <can_frame>.\n", prg);
@ -147,10 +147,12 @@ int main(int argc, char **argv)
frame.len = can_fd_dlc2len(can_fd_len2dlc(frame.len));
}
/* disable default receive filter on this RAW socket */
/* This is obsolete as we do not read from the socket at all, but for */
/* this reason we can remove the receive list in the Kernel to save a */
/* little (really a very little!) CPU usage. */
/*
* disable default receive filter on this RAW socket This is
* obsolete as we do not read from the socket at all, but for
* this reason we can remove the receive list in the Kernel to
* save a little (really a very little!) CPU usage.
*/
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {