remove redundant WINDOWS preprocessor definitions (#697)
This commit is contained in:
parent
f72324ffa1
commit
0ffb0ceb64
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue