From 1fa372e8abea77664aaf5b02cc63b6caa125d08f Mon Sep 17 00:00:00 2001 From: Nick James Kirkby <20824939+driftregion@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:14:15 +0800 Subject: [PATCH] run clang-format --- src/config.h | 6 +++--- src/sys_win32.h | 2 +- src/tp/isotp_sock.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config.h b/src/config.h index 7df55f5..52229df 100644 --- a/src/config.h +++ b/src/config.h @@ -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 diff --git a/src/sys_win32.h b/src/sys_win32.h index 5f55c19..f39b4a4 100644 --- a/src/sys_win32.h +++ b/src/sys_win32.h @@ -12,7 +12,7 @@ #include typedef SSIZE_T ssize_t; -#ifdef _MSC_VER +#ifdef _MSC_VER #define strncasecmp _strnicmp #define strcasecmp _stricmp #endif diff --git a/src/tp/isotp_sock.c b/src/tp/isotp_sock.c index fde9c9b..c19f7d6 100644 --- a/src/tp/isotp_sock.c +++ b/src/tp/isotp_sock.c @@ -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;