From c88788f5513422c37200a941c489e575942397e4 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 11 Aug 2020 20:42:08 -0400 Subject: fix call to va_start() --- src/ulimit/ulimit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ulimit/ulimit.c b/src/ulimit/ulimit.c index c326640a..1588ea3a 100644 --- a/src/ulimit/ulimit.c +++ b/src/ulimit/ulimit.c @@ -1,6 +1,8 @@ #include #include "sys/resource.h" #include "stdarg.h" +#include "stddef.h" +#include "errno.h" long ulimit(int cmd, ...) { @@ -13,7 +15,7 @@ long ulimit(int cmd, ...) return -1; } else if (cmd == UL_SETFSIZE) { va_list ap; - va_start(cmd); + va_start(ap, cmd); rl.rlim_cur = va_arg(ap, rlim_t) * 512; va_end(ap); if (setrlimit(RLIMIT_FSIZE, NULL) == 0) { -- cgit v1.2.1