aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorXiang Xiao <xiaoxiang@xiaomi.com>2021-05-19 18:20:38 +0800
committerJakub Jelen <jjelen@redhat.com>2021-06-10 09:22:32 +0200
commit672c1f8a3a3ee9b76283583df1e9d1f4fd0a8d17 (patch)
tree410ad757c7fa2e4ae55fc519196465fdcfc7e281 /tests
parent592d256a0bbfead2dc7eac1494406b9d923a8f23 (diff)
downloadlibssh-672c1f8a3a3ee9b76283583df1e9d1f4fd0a8d17.tar.gz
libssh-672c1f8a3a3ee9b76283583df1e9d1f4fd0a8d17.tar.xz
libssh-672c1f8a3a3ee9b76283583df1e9d1f4fd0a8d17.zip
windows: Define PATH_MAX to MAX_PATH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Change-Id: Ib3358ecb029d93c263d3cb39da25e82a772ae2c7
Diffstat (limited to 'tests')
-rw-r--r--tests/torture.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/torture.c b/tests/torture.c
index 3d9eb40d..2d21b3b9 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -1328,8 +1328,8 @@ end:
char *torture_make_temp_dir(const char *template)
{
DWORD rc = 0;
- char tmp_dir_path[MAX_PATH];
- char tmp_file_name[MAX_PATH];
+ char tmp_dir_path[PATH_MAX];
+ char tmp_file_name[PATH_MAX];
char *prefix = NULL;
char *path = NULL;
char *prefix_end = NULL;
@@ -1357,8 +1357,8 @@ char *torture_make_temp_dir(const char *template)
*prefix_end = '\0';
}
- rc = GetTempPathA(MAX_PATH, tmp_dir_path);
- if ((rc > MAX_PATH) || (rc == 0)) {
+ rc = GetTempPathA(PATH_MAX, tmp_dir_path);
+ if ((rc > PATH_MAX) || (rc == 0)) {
goto free_prefix;
}
@@ -1399,7 +1399,7 @@ static int recursive_rm_dir_content(const char *path)
DWORD last_error = 0;
- char file_path[MAX_PATH];
+ char file_path[PATH_MAX];
int rc = 0;
BOOL removed;
@@ -1507,8 +1507,8 @@ int torture_isdir(const char *path)
char *torture_create_temp_file(const char *template)
{
DWORD rc = 0;
- char tmp_dir_path[MAX_PATH];
- char tmp_file_name[MAX_PATH];
+ char tmp_dir_path[PATH_MAX];
+ char tmp_file_name[PATH_MAX];
char *prefix = NULL;
char *path = NULL;
char *prefix_end = NULL;
@@ -1534,8 +1534,8 @@ char *torture_create_temp_file(const char *template)
*prefix_end = '\0';
}
- rc = GetTempPathA(MAX_PATH, tmp_dir_path);
- if ((rc > MAX_PATH) || (rc == 0)) {
+ rc = GetTempPathA(PATH_MAX, tmp_dir_path);
+ if ((rc > PATH_MAX) || (rc == 0)) {
goto free_prefix;
}