Merge pull request #1 from SashaXser/alert-autofix-1

Fix code scanning alert no. 1: Multiplication result converted to larger type
This commit is contained in:
SashaXser 2024-10-12 20:49:21 +04:00 committed by GitHub
commit fc200ac629
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1132,7 +1132,7 @@ static bool set_ulimit(void)
// additional 1/2 for unpaired remote legs sending buffers // additional 1/2 for unpaired remote legs sending buffers
// 16 for listen_fd, epoll, hostlist, ... // 16 for listen_fd, epoll, hostlist, ...
#ifdef SPLICE_PRESENT #ifdef SPLICE_PRESENT
fdmax = (params.nosplice ? 2 : (params.tamper && !params.tamper_lim ? 4 : 6)) * params.maxconn; fdmax = (rlim_t)(params.nosplice ? 2 : (params.tamper && !params.tamper_lim ? 4 : 6)) * (rlim_t)params.maxconn;
#else #else
fdmax = 2 * params.maxconn; fdmax = 2 * params.maxconn;
#endif #endif