summaryrefslogtreecommitdiffstats
path: root/Objects/obmalloc.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-11 11:06:26 (GMT)
committerGitHub <noreply@github.com>2017-11-11 11:06:26 (GMT)
commite2f92de6a90ae11a6d8e01bd17fd88b005516835 (patch)
treea5bc255a98f488e5ecf195dc3f55665e9afecc47 /Objects/obmalloc.c
parente184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 (diff)
downloadcpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.zip
cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.gz
cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.bz2
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
Diffstat (limited to 'Objects/obmalloc.c')
-rw-r--r--Objects/obmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 7f5306f..4441c82 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -1646,7 +1646,7 @@ _PyMem_DebugCheckAddress(char api, const void *p)
{
const uint8_t *q = (const uint8_t *)p;
char msgbuf[64];
- char *msg;
+ const char *msg;
size_t nbytes;
const uint8_t *tail;
int i;
@@ -1661,7 +1661,7 @@ _PyMem_DebugCheckAddress(char api, const void *p)
id = (char)q[-SST];
if (id != api) {
msg = msgbuf;
- snprintf(msg, sizeof(msgbuf), "bad ID: Allocated using API '%c', verified using API '%c'", id, api);
+ snprintf(msgbuf, sizeof(msgbuf), "bad ID: Allocated using API '%c', verified using API '%c'", id, api);
msgbuf[sizeof(msgbuf)-1] = 0;
goto error;
}