lib_ulimit: fix the variable uninit coverity issue
Build Documentation / build-html (push) Has been cancelled

Initialize the rlim_max field in the rlp structure when handling
UL_SETFSIZE command in ulimit(), resolving an uninitialized variable
warning from Coverity static analysis.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2025-10-20 16:04:29 +08:00
committed by Xiang Xiao
parent 71889ff22e
commit ab572fe1cf
+1
View File
@@ -62,6 +62,7 @@ long ulimit(int cmd, long newlimit)
case UL_SETFSIZE:
{
struct rlimit rlp;
rlp.rlim_max = RLIM_INFINITY;
rlp.rlim_cur = newlimit * 512UL;
ret = setrlimit(RLIMIT_FSIZE, &rlp);
}