From 3fd1d62e29f714a7ee82d4e7ac0c7c8fac976871 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 9 Jan 2024 20:03:33 +0100 Subject: [PATCH] lib/limits.c: setup_limits(): Simplify, by calling str2si() instead of str2sl() Reviewed-by: "Serge E. Hallyn" Signed-off-by: Alejandro Colomar --- lib/limits.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/limits.c b/lib/limits.c index 636d087d3..6d3a3037c 100644 --- a/lib/limits.c +++ b/lib/limits.c @@ -496,9 +496,9 @@ void setup_limits (const struct passwd *info) continue; } if (strncmp (cp, "ulimit=", 7) == 0) { - long blocks; - if ( (str2sl(&blocks, cp + 7) == -1) - || (blocks != (int) blocks) + int blocks; + + if ( (str2si(&blocks, cp + 7) == -1) || (set_filesize_limit (blocks) != 0)) { SYSLOG ((LOG_WARN, "Can't set the ulimit for user %s", -- 2.47.3