projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f79b50
)
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
author
Alexey Izbyshev
<izbyshev@ispras.ru>
Sat, 25 Aug 2018 23:52:27 +0000
(
02:52
+0300)
committer
Benjamin Peterson
<benjamin@python.org>
Sat, 25 Aug 2018 23:52:27 +0000
(16:52 -0700)
Reported by Svace static analyzer.
Objects/abstract.c
patch
|
blob
|
history
diff --git
a/Objects/abstract.c
b/Objects/abstract.c
index 8d3030a118ae54cafe79ced9e4ab93bd4352be94..305910c3584ca0e507ccb86cd72f071b23932600 100644
(file)
--- a/
Objects/abstract.c
+++ b/
Objects/abstract.c
@@
-1510,7
+1510,7
@@
PySequence_Check(PyObject *s)
{
if (PyDict_Check(s))
return 0;
- return s
!= NULL && s
->ob_type->tp_as_sequence &&
+ return s->ob_type->tp_as_sequence &&
s->ob_type->tp_as_sequence->sq_item != NULL;
}