diff --git a/src/common/impl/FFstrbuf.c b/src/common/impl/FFstrbuf.c index d0a38f9ce..8005753df 100644 --- a/src/common/impl/FFstrbuf.c +++ b/src/common/impl/FFstrbuf.c @@ -790,9 +790,9 @@ bool ffStrbufMatchSeparatedNS(const FFstrbuf* strbuf, uint32_t compLength, const } for (const char* p = comp; p < comp + compLength;) { - const char* colon = memchr(p, separator, (size_t)(comp + compLength - p)); + const char* colon = memchr(p, separator, (size_t) (comp + compLength - p)); if (colon == NULL) { - uint32_t remainingLen = (uint32_t)(comp + compLength - p); + uint32_t remainingLen = (uint32_t) (comp + compLength - p); return strbuf->length == remainingLen && memcmp(strbuf->chars, p, remainingLen) == 0; } @@ -818,9 +818,9 @@ bool ffStrbufMatchSeparatedIgnCaseNS(const FFstrbuf* strbuf, uint32_t compLength } for (const char* p = comp; p < comp + compLength;) { - const char* colon = memchr(p, separator, (size_t)(comp + compLength - p)); + const char* colon = memchr(p, separator, (size_t) (comp + compLength - p)); if (colon == NULL) { - uint32_t remainingLen = (uint32_t)(comp + compLength - p); + uint32_t remainingLen = (uint32_t) (comp + compLength - p); return strbuf->length == remainingLen && strncasecmp(strbuf->chars, p, remainingLen) == 0; } diff --git a/src/common/impl/io_windows.c b/src/common/impl/io_windows.c index 6e720396e..cfac99e8e 100644 --- a/src/common/impl/io_windows.c +++ b/src/common/impl/io_windows.c @@ -441,7 +441,7 @@ const char* ffGetTerminalResponse(const char* request, int nParams, const char* while (true) { DWORD bytes = 0; - if (!ReadFile(hInput, buffer + bytesRead, (DWORD)(sizeof(buffer) - 1 - bytesRead), &bytes, NULL) || bytes == 0) { + if (!ReadFile(hInput, buffer + bytesRead, (DWORD) (sizeof(buffer) - 1 - bytesRead), &bytes, NULL) || bytes == 0) { va_end(args); return "ReadFile() failed"; } diff --git a/src/common/impl/netif_apple.c b/src/common/impl/netif_apple.c index 288f04543..1b12a8888 100644 --- a/src/common/impl/netif_apple.c +++ b/src/common/impl/netif_apple.c @@ -110,7 +110,9 @@ bool ffNetifGetDefaultRouteImplV4(FFNetifDefaultRouteResult* result) { && sdl->sdl_len #endif ) { - if (sdl->sdl_nlen > IF_NAMESIZE) return false; + if (sdl->sdl_nlen > IF_NAMESIZE) { + return false; + } memcpy(result->ifName, sdl->sdl_data, sdl->sdl_nlen); result->ifName[sdl->sdl_nlen] = '\0'; result->ifIndex = sdl->sdl_index; @@ -183,7 +185,9 @@ bool ffNetifGetDefaultRouteImplV6(FFNetifDefaultRouteResult* result) { && sdl->sdl_len #endif ) { - if (sdl->sdl_nlen > IF_NAMESIZE) return false; + if (sdl->sdl_nlen > IF_NAMESIZE) { + return false; + } memcpy(result->ifName, sdl->sdl_data, sdl->sdl_nlen); result->ifName[sdl->sdl_nlen] = '\0'; result->ifIndex = sdl->sdl_index; diff --git a/src/common/impl/netif_bsd.c b/src/common/impl/netif_bsd.c index e2632be79..2b59c6d53 100644 --- a/src/common/impl/netif_bsd.c +++ b/src/common/impl/netif_bsd.c @@ -65,7 +65,9 @@ bool ffNetifGetDefaultRouteImplV4(FFNetifDefaultRouteResult* result) { if ((rtm->rtm_flags & RTF_GATEWAY) && !(rtm->rtm_flags & RTF_REJECT) && (sa->sa_family == AF_INET)) { struct sockaddr_dl* sdl = (struct sockaddr_dl*) get_rt_address(rtm, RTA_IFP); if (sdl && sdl->sdl_family == AF_LINK) { - if (sdl->sdl_nlen > IF_NAMESIZE) continue; + if (sdl->sdl_nlen > IF_NAMESIZE) { + continue; + } memcpy(result->ifName, sdl->sdl_data, sdl->sdl_nlen); result->ifName[sdl->sdl_nlen] = '\0'; result->ifIndex = sdl->sdl_index; @@ -106,7 +108,9 @@ bool ffNetifGetDefaultRouteImplV6(FFNetifDefaultRouteResult* result) { if ((rtm->rtm_flags & RTF_GATEWAY) && !(rtm->rtm_flags & RTF_REJECT) && (sa->sa_family == AF_INET6)) { struct sockaddr_dl* sdl = (struct sockaddr_dl*) get_rt_address(rtm, RTA_IFP); if (sdl && sdl->sdl_family == AF_LINK) { - if (sdl->sdl_nlen > IF_NAMESIZE) continue; + if (sdl->sdl_nlen > IF_NAMESIZE) { + continue; + } memcpy(result->ifName, sdl->sdl_data, sdl->sdl_nlen); result->ifName[sdl->sdl_nlen] = '\0'; result->ifIndex = sdl->sdl_index; diff --git a/src/detection/host/host_linux.c b/src/detection/host/host_linux.c index 051dd8099..81418a81d 100644 --- a/src/detection/host/host_linux.c +++ b/src/detection/host/host_linux.c @@ -67,7 +67,6 @@ const char* ffDetectHost(FFHostResult* host) { if (ffStrbufStartsWithS(&host->name, "Standard PC")) { ffStrbufPrependS(&host->name, "KVM/QEMU "); } - #if __aarch64__ else if (host->family.length == 0 && ffStrbufEqualS(&host->vendor, "Apple Inc.") && ffStrbufStartsWithS(&host->name, "Mac")) { // Hack for Asahi Linux diff --git a/src/detection/terminalshell/terminalshell_windows.c b/src/detection/terminalshell/terminalshell_windows.c index 2ce9bb5fd..cd687e892 100644 --- a/src/detection/terminalshell/terminalshell_windows.c +++ b/src/detection/terminalshell/terminalshell_windows.c @@ -163,9 +163,10 @@ static bool detectDefaultTerminal(FFTerminalResult* result) { FF_AUTO_CLOSE_FD HANDLE hkcu = NULL; if (ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Console\\%%Startup", &hkcu, NULL) && ffRegReadData(hkcu, L"DelegationTerminal", &(FFArgBuffer) { - .data = uuid, - .length = (uint32_t) (sizeof(regPath) - (size_t) (uuid - regPath) * sizeof(wchar_t)), - }, NULL)) { + .data = uuid, + .length = (uint32_t) (sizeof(regPath) - (size_t) (uuid - regPath) * sizeof(wchar_t)), + }, + NULL)) { if (wcscmp(uuid, L"{00000000-0000-0000-0000-000000000000}") == 0 || // Let Windows decide wcscmp(uuid, L"{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}") == 0) // Conhost { diff --git a/src/logo/builtin.c b/src/logo/builtin.c index 0cd83efe3..f969f4379 100644 --- a/src/logo/builtin.c +++ b/src/logo/builtin.c @@ -1563,7 +1563,7 @@ static const FFlogo E[] = { }, // EN-OS { - .names = {"ENOS"}, + .names = { "ENOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ENOS, .colors = { FF_COLOR_FG_LIGHT_BLUE, @@ -2665,7 +2665,7 @@ static const FFlogo L[] = { }, // LimeOS { - .names = {"LimeOS"}, + .names = { "LimeOS" }, .lines = FASTFETCH_DATATEXT_LOGO_LIMEOS, .colors = { FF_COLOR_FG_DEFAULT, @@ -4264,7 +4264,7 @@ static const FFlogo R[] = { }, // Redrose { - .names = {"Redrose"}, + .names = { "Redrose" }, .lines = FASTFETCH_DATATEXT_LOGO_REDROSE, .colors = { FF_COLOR_FG_RED,