From: Zackery Spytz Date: Thu, 8 Nov 2018 09:45:00 +0000 (-0700) Subject: Replace dead code with an assertion in winreg.c. (GH-10028) X-Git-Tag: v3.8.0a1~542 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d95312fb8eb1684879b9fb8c5c928089326d0df;p=thirdparty%2FPython%2Fcpython.git Replace dead code with an assertion in winreg.c. (GH-10028) --- 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); }