summaryrefslogtreecommitdiff
path: root/Modules/_scproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_scproxy.c')
-rw-r--r--Modules/_scproxy.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c
index 66b6e3439f..1ce4b776f3 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;
@@ -130,7 +126,7 @@ error:
}
static int
-set_proxy(PyObject* proxies, char* proto, CFDictionaryRef proxyDict,
+set_proxy(PyObject* proxies, const char* proto, CFDictionaryRef proxyDict,
CFStringRef enabledKey,
CFStringRef hostKey, CFStringRef portKey)
{