emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#29123: closed ([PATCH] grep: mark matchers table c


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#29123: closed ([PATCH] grep: mark matchers table const)
Date: Fri, 03 Nov 2017 08:46:01 +0000

Your message dated Fri, 3 Nov 2017 01:45:07 -0700
with message-id <address@hidden>
and subject line Re: bug#29123: [PATCH] grep: mark matchers table const
has caused the debbugs.gnu.org bug report #29123,
regarding [PATCH] grep: mark matchers table const
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
29123: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29123
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] grep: mark matchers table const Date: Fri, 3 Nov 2017 03:03:43 -0500
* src/grep.c (matchers): Mark const.
---
 src/grep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/grep.c b/src/grep.c
index 2277a60..0643a7e 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2003,7 +2003,7 @@ if any error occurs and -q is not given, the exit status 
is 2.\n"));
 
 /* Pattern compilers and matchers.  */
 
-static struct
+static const struct
 {
   char const name[12];
   int syntax; /* used if compile == GEAcompile */
-- 
2.15.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#29123: [PATCH] grep: mark matchers table const Date: Fri, 3 Nov 2017 01:45:07 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
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.

Attachment: 0001-grep-omit-a-dup-const.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]