New submission from Alex Henrie <[email protected]>:
The function _ssl__SSLContext_load_verify_locations_impl currently contains the
following code:
if (r != 1) {
ok = 0;
if (errno != 0) {
ERR_clear_error();
PyErr_SetFromErrno(PyExc_OSError);
}
else {
_setSSLError(NULL, 0, __FILE__, __LINE__);
}
goto error;
}
}
goto end;
error:
ok = 0;
It is unnecessary to set ok to 0 before jumping to error because the first
instruction after the error label does the same thing.
----------
assignee: christian.heimes
components: SSL
messages: 359654
nosy: alex.henrie, christian.heimes
priority: normal
severity: normal
status: open
title: Dead assignment in _ssl__SSLContext_load_verify_locations_impl
type: performance
versions: Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39272>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com