]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: avoid a cast in regex syntax bit definitions
authorCollin Funk <collin.funk1@gmail.com>
Mon, 26 Jan 2026 02:52:34 +0000 (18:52 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 3 Feb 2026 02:08:18 +0000 (18:08 -0800)
The cast doesn't have any benefit over using a UL suffix and prevents
the macro from being used in preprocessor directives.

Reviewed-by: Arjun Shankar <arjun@redhat.com>
posix/regex.h

index 192d5bf2a3f5a0a392e9986846e624cdabf97548..2d8392cf84aeb42f9bbcd672f6e607d7be02f220 100644 (file)
@@ -74,7 +74,7 @@ typedef unsigned long int reg_syntax_t;
 #ifdef __USE_GNU
 /* If this bit is not set, then \ inside a bracket expression is literal.
    If set, then such a \ quotes the following character.  */
-# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+# define RE_BACKSLASH_ESCAPE_IN_LISTS 1ul
 
 /* If this bit is not set, then + and ? are operators, and \+ and \? are
      literals.