Module Name:    src
Committed By:   christos
Date:           Fri Jan 19 18:41:38 UTC 2024

Modified Files:
        src/lib/libc/stdlib: getopt.c getopt_long.c

Log Message:
add some const


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/stdlib/getopt.c
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/stdlib/getopt_long.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/getopt.c
diff -u src/lib/libc/stdlib/getopt.c:1.29 src/lib/libc/stdlib/getopt.c:1.30
--- src/lib/libc/stdlib/getopt.c:1.29	Thu Jun  5 18:00:22 2014
+++ src/lib/libc/stdlib/getopt.c	Fri Jan 19 13:41:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: getopt.c,v 1.29 2014/06/05 22:00:22 christos Exp $	*/
+/*	$NetBSD: getopt.c,v 1.30 2024/01/19 18:41:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getopt.c,v 1.29 2014/06/05 22:00:22 christos Exp $");
+__RCSID("$NetBSD: getopt.c,v 1.30 2024/01/19 18:41:38 christos Exp $");
 
 #include "namespace.h"
 
@@ -63,7 +63,7 @@ int
 getopt(int nargc, char * const nargv[], const char *ostr)
 {
 	static const char *place = EMSG;	/* option letter processing */
-	char *oli;				/* option letter list index */
+	const char *oli;			/* option letter list index */
 
 	_DIAGASSERT(nargv != NULL);
 	_DIAGASSERT(ostr != NULL);

Index: src/lib/libc/stdlib/getopt_long.c
diff -u src/lib/libc/stdlib/getopt_long.c:1.27 src/lib/libc/stdlib/getopt_long.c:1.28
--- src/lib/libc/stdlib/getopt_long.c:1.27	Tue Sep  1 15:39:57 2015
+++ src/lib/libc/stdlib/getopt_long.c	Fri Jan 19 13:41:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: getopt_long.c,v 1.27 2015/09/01 19:39:57 kamil Exp $	*/
+/*	$NetBSD: getopt_long.c,v 1.28 2024/01/19 18:41:38 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getopt_long.c,v 1.27 2015/09/01 19:39:57 kamil Exp $");
+__RCSID("$NetBSD: getopt_long.c,v 1.28 2024/01/19 18:41:38 christos Exp $");
 
 #include "namespace.h"
 
@@ -167,7 +167,7 @@ permute_args(int panonopt_start, int pan
 static int
 getopt_internal(int nargc, char **nargv, const char *options)
 {
-	char *oli;				/* option letter list index */
+	const char *oli;			/* option letter list index */
 	int optchar;
 
 	_DIAGASSERT(nargv != NULL);

Reply via email to