From e2f92de6a90ae11a6d8e01bd17fd88b005516835 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 11 Nov 2017 13:06:26 +0200 Subject: Add the const qualifier to "char *" variables that refer to literal strings. (#4370) --- Modules/ossaudiodev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Modules/ossaudiodev.c') diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 8bb4d0d3d4..58ee71f901 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -53,7 +53,7 @@ typedef unsigned long uint32_t; typedef struct { PyObject_HEAD - char *devicename; /* name of the device file */ + const char *devicename; /* name of the device file */ int fd; /* file descriptor */ int mode; /* file mode (O_RDONLY, etc.) */ Py_ssize_t icount; /* input count */ @@ -82,8 +82,8 @@ newossobject(PyObject *arg) { oss_audio_t *self; int fd, afmts, imode; - char *devicename = NULL; - char *mode = NULL; + const char *devicename = NULL; + const char *mode = NULL; /* Two ways to call open(): open(device, mode) (for consistency with builtin open()) @@ -167,7 +167,7 @@ oss_dealloc(oss_audio_t *self) static oss_mixer_t * newossmixerobject(PyObject *arg) { - char *devicename = NULL; + const char *devicename = NULL; int fd; oss_mixer_t *self; -- cgit v1.2.1