mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 10:27:22 +09:00
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:
22
src/misc.c
22
src/misc.c
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user