From bf4a0abe5c308bec7ed59ff2d79dfc19088f7db5 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 12 Nov 2017 14:57:22 +0100 Subject: [PATCH] conf_parse_rlimit(): Refactor, replace 'new' with 'cfg' 'new' is a reserved keyword in C++, it is recommnded to avoid it also in C. Signed-off-by: Joachim Nilsson --- src/conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf.c b/src/conf.c index 17ef94ad..c4ee93d3 100644 --- a/src/conf.c +++ b/src/conf.c @@ -166,7 +166,7 @@ static const struct rlimit_name rlimit_names[] = { void conf_parse_rlimit(char *line) { struct rlimit rlim; - rlim_t new, *set; + rlim_t cfg, *set; const struct rlimit_name *name; int resource = -1; @@ -196,11 +196,11 @@ void conf_parse_rlimit(char *line) goto fail; if (!strcmp(tok, "infinity")) { - new = RLIM_INFINITY; + cfg = RLIM_INFINITY; } else { const char *err = NULL; - new = strtonum(tok, 0, (long long)2 << 31, &err); + cfg = strtonum(tok, 0, (long long)2 << 31, &err); if (err) goto fail; } @@ -208,7 +208,7 @@ void conf_parse_rlimit(char *line) if (getrlimit(resource, &rlim)) goto fail; - *set = new; + *set = cfg; if (setrlimit(resource, &rlim)) goto fail;