Zev Weiss wrote:
-static struct +static const struct { char const name[12];
There's already a const after the } at the end of the struct, so this 'const' is not needed. The usual style in 'grep' is to put the 'const' after the type, not before it.
Come to think of it, the 'const' in front of 'name' is also a duplicate, so I installed the attached.
>From 842d5c3b79ad7d9eb627e30aeeb7808b84b2adb8 Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Fri, 3 Nov 2017 01:39:55 -0700 Subject: [PATCH] grep: omit a dup 'const' * src/grep.c (matchers): Omit duplicate 'const'. --- src/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grep.c b/src/grep.c index 2277a60..ad5cfa2 100644 --- a/src/grep.c +++ b/src/grep.c @@ -2005,7 +2005,7 @@ if any error occurs and -q is not given, the exit status is 2.\n")); static struct { - char const name[12]; + char name[12]; int syntax; /* used if compile == GEAcompile */ compile_fp_t compile; execute_fp_t execute; -- 2.7.4