From 3d94c830a3d466e1e387d6e1efa9f9c7ccbcc10f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 18 Jul 2023 14:55:41 -0700 Subject: [PATCH] scripts/checkpatch: Fix check for libc API defines Re-ordering the API names moved a trailing '|' causing the pattern to match *every* #define in the input. Signed-off-by: Keith Packard --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b34c2ad31d2..c72f54e9c14 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -595,7 +595,7 @@ our @mode_permission_funcs = ( our $api_defines = qr{(?x: _ATFILE_SOURCE| _BSD_SOURCE| - _DEFAULT_SOURCE + _DEFAULT_SOURCE| _GNU_SOURCE| _ISOC11_SOURCE| _ISOC99_SOURCE| @@ -603,7 +603,7 @@ our $api_defines = qr{(?x: _POSIX_SOURCE| _SVID_SOURCE| _XOPEN_SOURCE| - _XOPEN_SOURCE_EXTENDED| + _XOPEN_SOURCE_EXTENDED )}; my $word_pattern = '\b[A-Z]?[a-z]{2,}\b';