From: Brett Cannon Date: Wed, 7 Sep 2016 21:07:16 +0000 (-0700) Subject: Eliminate a tautological-pointer-compare warning found by Clang. X-Git-Tag: v3.6.0b1~331 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56be5f5376d19ffe1a3859f19577dcb6df00332f;p=thirdparty%2FPython%2Fcpython.git Eliminate a tautological-pointer-compare warning found by Clang. --- diff --git a/Misc/NEWS b/Misc/NEWS index 772cb7a93b75..56d8434d810c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -97,6 +97,8 @@ Library - 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 index 68be458bf4e0..1ce4b776f3e2 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -71,16 +71,12 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__))) 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;