[Python-checkins] Replace dead code with an assertion in winreg.c. (GH-10028)
Serhiy Storchaka
webhook-mailer at python.org
Thu Nov 8 04:45:13 EST 2018
https://github.com/python/cpython/commit/5d95312fb8eb1684879b9fb8c5c928089326d0df
commit: 5d95312fb8eb1684879b9fb8c5c928089326d0df
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018-11-08T11:45:00+02:00
summary:
Replace dead code with an assertion in winreg.c. (GH-10028)
files:
M PC/winreg.c
diff --git a/PC/winreg.c b/PC/winreg.c
index 4f5a676f10b5..c6ad7ab64e16 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);
}
More information about the Python-checkins
mailing list