summaryrefslogtreecommitdiff
path: root/Modules/ossaudiodev.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-11 13:06:26 +0200
committerGitHub <noreply@github.com>2017-11-11 13:06:26 +0200
commite2f92de6a90ae11a6d8e01bd17fd88b005516835 (patch)
treea5bc255a98f488e5ecf195dc3f55665e9afecc47 /Modules/ossaudiodev.c
parente184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 (diff)
downloadcpython-git-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.gz
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
Diffstat (limited to 'Modules/ossaudiodev.c')
-rw-r--r--Modules/ossaudiodev.c8
1 files changed, 4 insertions, 4 deletions
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;