From 4f30a79677397a369960758d7e453b21c0f2bb34 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 1 Mar 2026 20:41:28 +0100 Subject: [PATCH] lib/limits.c: setup_limits(): Simplify, calling stpspn() instead of strprefix() p=stpspn(p,",") jumps over any amount of leading commas, which we were doing anyway in the loop. Signed-off-by: Alejandro Colomar --- lib/limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/limits.c b/lib/limits.c index fa751104e1..04dc2d86c7 100644 --- a/lib/limits.c +++ b/lib/limits.c @@ -467,7 +467,7 @@ void setup_limits (const struct passwd *info) for (cp = info->pw_gecos; cp != NULL; cp = strchr (cp, ',')) { char *val; - cp = strprefix(cp, ",") ?: cp; + cp = stpspn(cp, ","); val = strprefix(cp, "pri="); if (val != NULL) {