summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-05-27 05:21:30 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-05-27 05:21:30 +0000
commitd1b6cd7bfb35ffecd8b52d9d2b3cd608ab6515e0 (patch)
tree34ad16ca127a572f8ecde22277e51e5d520ec0a7 /Objects/unicodeobject.c
parent2f3136b8f0b4845b29b2d7363ae2181a06b79750 (diff)
downloadcpython-git-d1b6cd7bfb35ffecd8b52d9d2b3cd608ab6515e0.tar.gz
Fix Coverity warnings.
- Check the correct variable (str_obj, not str) for NULL - sep_len was already verified it wasn't 0
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index d5935e31df..783eb8f2a8 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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) {