# HG changeset patch # User Simon Josefsson # Date 1240555850 -7200 # Node ID 7dc5cac2c07ea6676c9b7841f283403caad9d0ec # Parent d88c5ec9288d3a3a74da02e0de34beae967a9f65 getopt: Use const for constant data. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-24 Simon Josefsson + + * lib/getopt1.c (main): Use 'const' for static array. + 2009-04-24 Simon Josefsson * top/maint.mk: Sync with coreutils. diff --git a/lib/getopt1.c b/lib/getopt1.c --- 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 @@ { 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},