mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Fix Coverity warnings.
- Check the correct variable (str_obj, not str) for NULL - sep_len was already verified it wasn't 0
This commit is contained in:
parent
2f3136b8f0
commit
d1b6cd7bfb
2 changed files with 2 additions and 7 deletions
|
@ -3955,7 +3955,7 @@ Py_ssize_t PyUnicode_Find(PyObject *str,
|
|||
PyUnicodeObject* sub_obj;
|
||||
|
||||
str_obj = (PyUnicodeObject*) PyUnicode_FromObject(str);
|
||||
if (!str)
|
||||
if (!str_obj)
|
||||
return -2;
|
||||
sub_obj = (PyUnicodeObject*) PyUnicode_FromObject(substr);
|
||||
if (!sub_obj) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue