remove redundant WINDOWS preprocessor definitions (#697)

This commit is contained in:
Tess Gauthier 2023-10-16 09:56:42 -04:00 committed by GitHub
parent f72324ffa1
commit 0ffb0ceb64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 16 deletions

View File

@ -165,20 +165,14 @@ find_helper(void)
char module_path[PATH_MAX + 1];
char *ep;
DWORD n;
#ifdef WINDOWS
size_t len = 0;
_dupenv_s(&helper, &len, "SSH_PKCS11_HELPER");
if (helper == NULL || len == 0) {
if ((helper = find_helper_in_module_path()) == NULL)
helper = _PATH_SSH_PKCS11_HELPER;
}
#else
if ((helper = getenv("SSH_PKCS11_HELPER")) == NULL || strlen(helper) == 0) {
if ((helper = find_helper_in_module_path()) == NULL)
helper = _PATH_SSH_PKCS11_HELPER;
}
#endif /* WINDOWS */
if (!path_absolute(helper)) {
error_f("helper \"%s\" unusable: path not absolute", helper);
return NULL;

View File

@ -84,20 +84,14 @@ find_helper(void)
char module_path[PATH_MAX + 1];
char *ep;
DWORD n;
#ifdef WINDOWS
size_t len = 0;
_dupenv_s(&helper, &len, "SSH_SK_HELPER");
if (helper == NULL || len == 0) {
if ((helper = find_helper_in_module_path()) == NULL)
helper = _PATH_SSH_SK_HELPER;
}
#else
if ((helper = getenv("SSH_SK_HELPER")) == NULL || strlen(helper) == 0) {
if ((helper = find_helper_in_module_path()) == NULL)
helper = _PATH_SSH_SK_HELPER;
}
#endif /* WINDOWS */
if (!path_absolute(helper)) {
error_f("helper \"%s\" unusable: path not absolute", helper);
return NULL;