8000 Replace dead code with an assertion in winreg.c. (GH-10028) · python/cpython@5d95312 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d95312

Browse files
ZackerySpytzserhiy-storchaka
authored andcommitted
Replace dead code with an assertion in winreg.c. (GH-10028)
1 parent a44d34e commit 5d95312

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

PC/winreg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
651651

652652
t = PyList_GET_ITEM(value, j);
653653
wstr = PyUnicode_AsUnicodeAndSize(t, &len);
654-
if (wstr == NULL)
655-
return FALSE;
654+
assert(wstr);
656655
wcscpy(P, wstr);
657656
P += (len + 1);
658657
}

0 commit comments

Comments
 (0)
0