Module Name: src
Committed By: kre
Date: Fri Jul 9 20:00:26 UTC 2021
Modified Files:
src/tests/lib/libc/stdio: h_intr.c
Log Message:
Make opts.cmd const char * rather than char * -- nothing ever modifies
the string it points to, it is never passed to a function not taking a
const char * arg, and this allows "" (or other literal strings if ever
needed) to be assigned to it - which should fix the build.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/stdio/h_intr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/stdio/h_intr.c
diff -u src/tests/lib/libc/stdio/h_intr.c:1.3 src/tests/lib/libc/stdio/h_intr.c:1.4
--- src/tests/lib/libc/stdio/h_intr.c:1.3 Fri Jul 9 15:26:59 2021
+++ src/tests/lib/libc/stdio/h_intr.c Fri Jul 9 20:00:26 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: h_intr.c,v 1.3 2021/07/09 15:26:59 christos Exp $ */
+/* $NetBSD: h_intr.c,v 1.4 2021/07/09 20:00:26 kre Exp $ */
/**
* Test of interrupted I/O to popen()ed commands.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: h_intr.c,v 1.3 2021/07/09 15:26:59 christos Exp $");
+__RCSID("$NetBSD: h_intr.c,v 1.4 2021/07/09 20:00:26 kre Exp $");
#include <time.h>
#include <err.h>
@@ -53,7 +53,7 @@ static void usage(FILE *fp);
/* Globals */
static struct options {
- char* cmd; /* cmd to run (which must read from stdin) */
+ const char* cmd; /* cmd to run (which must read from stdin) */
size_t bsize; /* block size to use */
size_t asize; /* alt. stdio buffer size */
int btype; /* buffering type: _IONBF, ... */