[Python-checkins] cpython: Eliminate a tautological-pointer-compare warning found by Clang.
brett.cannon
python-checkins at python.org
Wed Sep 7 17:07:45 EDT 2016
https://hg.python.org/cpython/rev/bac7899c55fa
changeset: 103245:bac7899c55fa
user: Brett Cannon <brett at python.org>
date: Wed Sep 07 14:07:16 2016 -0700
summary:
Eliminate a tautological-pointer-compare warning found by Clang.
files:
Misc/NEWS | 2 ++
Modules/_scproxy.c | 14 +++++---------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -97,6 +97,8 @@
- Issue #16113: Add SHA-3 and SHAKE support to hashlib module.
+- Eliminate a tautological-pointer-compare warning in _scproxy.c.
+
- Issue #27776: The :func:`os.urandom` function does now block on Linux 3.17
and newer until the system urandom entropy pool is initialized to increase
the security. This change is part of the :pep:`524`.
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c
--- a/Modules/_scproxy.c
+++ b/Modules/_scproxy.c
@@ -71,16 +71,12 @@
result = PyDict_New();
if (result == NULL) goto error;
- if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
- aNum = CFDictionaryGetValue(proxyDict,
- kSCPropNetProxiesExcludeSimpleHostnames);
- if (aNum == NULL) {
- v = PyBool_FromLong(0);
- } else {
- v = PyBool_FromLong(cfnum_to_int32(aNum));
- }
- } else {
+ aNum = CFDictionaryGetValue(proxyDict,
+ kSCPropNetProxiesExcludeSimpleHostnames);
+ if (aNum == NULL) {
v = PyBool_FromLong(0);
+ } else {
+ v = PyBool_FromLong(cfnum_to_int32(aNum));
}
if (v == NULL) goto error;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list