Skip to content

Commit

Permalink
run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
driftregion committed Jul 12, 2024
1 parent 4303123 commit 1fa372e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ static_assert(UDS_CLIENT_DEFAULT_P2_STAR_MS > UDS_CLIENT_DEFAULT_P2_MS, "");
#endif

static_assert(0 < UDS_SERVER_DEFAULT_P2_MS &&
UDS_SERVER_DEFAULT_P2_MS < UDS_SERVER_DEFAULT_P2_STAR_MS &&
UDS_SERVER_DEFAULT_P2_STAR_MS < UDS_SERVER_DEFAULT_S3_MS,
"");
UDS_SERVER_DEFAULT_P2_MS < UDS_SERVER_DEFAULT_P2_STAR_MS &&
UDS_SERVER_DEFAULT_P2_STAR_MS < UDS_SERVER_DEFAULT_S3_MS,
"");

// Amount of time to wait after boot before accepting 0x27 requests.
#ifndef UDS_SERVER_0x27_BRUTE_FORCE_MITIGATION_BOOT_DELAY_MS
Expand Down
2 changes: 1 addition & 1 deletion src/sys_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;

#ifdef _MSC_VER
#ifdef _MSC_VER
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/tp/isotp_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,18 @@ static int LinuxSockBind(const char *if_name, uint32_t rxid, uint32_t txid, bool
perror("setsockopt");
return -1;
}

struct can_isotp_options opts;
memset(&opts, 0, sizeof(opts));
// configure socket to wait for tx completion to catch FC frame timeouts
opts.flags |= CAN_ISOTP_WAIT_TX_DONE;

if (functional) {
printf("configuring fd: %d as functional\n", fd);
// configure the socket as listen-only to avoid sending FC frames
opts.flags |= CAN_ISOTP_LISTEN_MODE;
}

if (setsockopt(fd, SOL_CAN_ISOTP, CAN_ISOTP_OPTS, &opts, sizeof(opts)) < 0) {
perror("setsockopt (isotp_options):");
return -1;
Expand Down

0 comments on commit 1fa372e

Please sign in to comment.