[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] getopt: Use const for constant data.
From: |
Simon Josefsson |
Subject: |
[PATCH] getopt: Use const for constant data. |
Date: |
Fri, 24 Apr 2009 08:51:40 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (gnu/linux) |
Pushed; the file isn't closely synchronized to libc so I thought fixing
another problem wouldn't hurt.
/Simon
---
ChangeLog | 4 ++++
lib/getopt1.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a77ce03..11dcb32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-04-24 Simon Josefsson <address@hidden>
+ * lib/getopt1.c (main): Use 'const' for static array.
+
+2009-04-24 Simon Josefsson <address@hidden>
+
* top/maint.mk: Sync with coreutils.
* NEWS: Explain incompatibilities.
diff --git a/lib/getopt1.c b/lib/getopt1.c
index d6a3ecf..ba115c4 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -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 @@ main (int argc, char **argv)
{
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},
--
1.6.2.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] getopt: Use const for constant data.,
Simon Josefsson <=