GH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905)

This commit is contained in:
Chris Eibl 2025-03-31 16:54:30 +02:00 committed by GitHub
parent cf839c3373
commit 7cbcb6efd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -6111,7 +6111,7 @@ _ssl_enum_certificates_impl(PyObject *module, const char *store_name)
return PyErr_SetFromWindowsErr(GetLastError());
}
while (pCertCtx = CertEnumCertificatesInStore(hCollectionStore, pCertCtx)) {
while ((pCertCtx = CertEnumCertificatesInStore(hCollectionStore, pCertCtx))) {
cert = PyBytes_FromStringAndSize((const char*)pCertCtx->pbCertEncoded,
pCertCtx->cbCertEncoded);
if (!cert) {
@ -6210,7 +6210,7 @@ _ssl_enum_crls_impl(PyObject *module, const char *store_name)
return PyErr_SetFromWindowsErr(GetLastError());
}
while (pCrlCtx = CertEnumCRLsInStore(hCollectionStore, pCrlCtx)) {
while ((pCrlCtx = CertEnumCRLsInStore(hCollectionStore, pCrlCtx))) {
crl = PyBytes_FromStringAndSize((const char*)pCrlCtx->pbCrlEncoded,
pCrlCtx->cbCrlEncoded);
if (!crl) {

View file

@ -5372,7 +5372,7 @@ _testFileExistsByName(LPCWSTR path, BOOL followLinks)
sizeof(info)))
{
if (!(info.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ||
!followLinks && IsReparseTagNameSurrogate(info.ReparseTag))
(!followLinks && IsReparseTagNameSurrogate(info.ReparseTag)))
{
return TRUE;
}

View file

@ -2760,7 +2760,7 @@ process(int argc, wchar_t ** argv)
// We searched earlier, so if we didn't find anything, now we react
exitCode = searchExitCode;
// If none found, and if permitted, install it
if (exitCode == RC_NO_PYTHON && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL") ||
if (((exitCode == RC_NO_PYTHON) && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL")) ||
isEnvVarSet(L"PYLAUNCHER_ALWAYS_INSTALL")) {
exitCode = installEnvironment(&search);
if (!exitCode) {