changeset 31187:26adfc1500fa

getopt: Use const for constant data.
author Simon Josefsson <simon@josefsson.org>
date Fri, 24 Apr 2009 08:50:50 +0200
parents 3001dd81d259
children 95c9c45f7bd0
files ChangeLog lib/getopt1.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Apr 24 00:53:35 2009 +0200
+++ b/ChangeLog	Fri Apr 24 08:50:50 2009 +0200
@@ -1,3 +1,7 @@
+2009-04-24  Simon Josefsson  <simon@josefsson.org>
+
+	* lib/getopt1.c (main): Use 'const' for static array.
+
 2009-04-24  Simon Josefsson  <simon@josefsson.org>
 
 	* top/maint.mk: Sync with coreutils.
--- a/lib/getopt1.c	Fri Apr 24 00:53:35 2009 +0200
+++ b/lib/getopt1.c	Fri Apr 24 08:50:50 2009 +0200
@@ -1,5 +1,5 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006
+   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006,2009
      Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -91,7 +91,7 @@
     {
       int this_option_optind = optind ? optind : 1;
       int option_index = 0;
-      static struct option long_options[] =
+      static const struct option long_options[] =
       {
 	{"add", 1, 0, 0},
 	{"append", 0, 0, 0},