misc: Reformat ssh_get_user_home_dir()

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2026-01-27 15:43:44 +01:00
parent 3dfaa70fcf
commit a7cf4bb37b

View File

@@ -110,20 +110,20 @@
#ifdef _WIN32
char *ssh_get_user_home_dir(void)
{
char tmp[PATH_MAX] = {0};
char *szPath = NULL;
char tmp[PATH_MAX] = {0};
char *szPath = NULL;
if (SHGetSpecialFolderPathA(NULL, tmp, CSIDL_PROFILE, TRUE)) {
szPath = malloc(strlen(tmp) + 1);
if (szPath == NULL) {
return NULL;
if (SHGetSpecialFolderPathA(NULL, tmp, CSIDL_PROFILE, TRUE)) {
szPath = malloc(strlen(tmp) + 1);
if (szPath == NULL) {
return NULL;
}
strcpy(szPath, tmp);
return szPath;
}
strcpy(szPath, tmp);
return szPath;
}
return NULL;
return NULL;
}
/* we have read access on file */