Constness correction for the getopt(3) function under REPLACE_GETOPT
Use the __UNCONST() macro, which is used in the other parts for the same argument nargv, but under the !REPLACE_GETOPT namespace.
This commit is contained in:
parent
5f38d8b6fe
commit
596fd5662e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getopt_long.c,v 1.25 2009/03/20 14:05:54 joerg Exp $ */
|
||||
/* $NetBSD: getopt_long.c,v 1.26 2015/09/01 01:28:17 kamil Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: getopt_long.c,v 1.25 2009/03/20 14:05:54 joerg Exp $");
|
||||
__RCSID("$NetBSD: getopt_long.c,v 1.26 2015/09/01 01:28:17 kamil Exp $");
|
||||
|
||||
#include "namespace.h"
|
||||
|
||||
@ -326,7 +326,7 @@ getopt(nargc, nargv, options)
|
||||
*/
|
||||
if (nonopt_end != -1) {
|
||||
permute_args(nonopt_start, nonopt_end, optind,
|
||||
nargv);
|
||||
__UNCONST(nargv));
|
||||
optind -= nonopt_end - nonopt_start;
|
||||
}
|
||||
nonopt_start = nonopt_end = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user