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:
Neal Norwitz 2006-05-27 05:21:30 +00:00
parent 2f3136b8f0
commit d1b6cd7bfb
2 changed files with 2 additions and 7 deletions

View file

@ -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) {