summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-11-08 09:45:00 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-11-08 09:45:00 (GMT)
commit5d95312fb8eb1684879b9fb8c5c928089326d0df (patch)
tree3f8e094410e3b96b3d7ff9da8e25a0d06d9dcc4e /PC
parenta44d34e17908a49d584f86c4f8642a50707b7150 (diff)
downloadcpython-5d95312fb8eb1684879b9fb8c5c928089326d0df.zip
cpython-5d95312fb8eb1684879b9fb8c5c928089326d0df.tar.gz
cpython-5d95312fb8eb1684879b9fb8c5c928089326d0df.tar.bz2
Replace dead code with an assertion in winreg.c. (GH-10028)
Diffstat (limited to 'PC')
-rw-r--r--PC/winreg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 4f5a676..c6ad7ab 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -651,8 +651,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
t = PyList_GET_ITEM(value, j);
wstr = PyUnicode_AsUnicodeAndSize(t, &len);
- if (wstr == NULL)
- return FALSE;
+ assert(wstr);
wcscpy(P, wstr);
P += (len + 1);
}