From a76e5e1f028557a24fe4ffb4e56a142d521efbdd Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Mon, 20 May 2024 09:13:33 +0200 Subject: [PATCH] xargs: avoid sc_useless_cpp_parens failure $ make syntax-check ... xargs/xargs.c:674:#if !(defined(SIGUSR1) && defined(SIGUSR2)) maint.mk: found useless parentheses in cpp directive make: *** [maint.mk:924: sc_useless_cpp_parens] Error 1 * xargs/xargs.c (main): Simplify -P #if conditional to avoid the above syntax-check failure. --- xargs/xargs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xargs/xargs.c b/xargs/xargs.c index 0f1d0227..e231223a 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -671,11 +671,11 @@ main (int argc, char **argv) case 'P': /* Allow only up to MAX_PROC_MAX child processes. */ proc_max = parse_num (optarg, 'P', 0L, MAX_PROC_MAX, 1); -#if !(defined(SIGUSR1) && defined(SIGUSR2)) +#if defined SIGUSR1 && defined SIGUSR2 + catch_usr_signals = true; +#else error (0, 0, _("SIGUSR1 and SIGUSR2 are not both defined, so the -P option does nothing.")); proc_max = 1; -#else - catch_usr_signals = true; #endif break;