Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1b36e9b2
Commit
1b36e9b2
authored
May 07, 2023
by
Sven Baars
Committed by
Alexandre Julliard
May 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree/tests: Remove the parent argument from create_new_dir() (Coverity).
parent
8d11327e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
mscoree.c
dlls/mscoree/tests/mscoree.c
+4
-9
No files found.
dlls/mscoree/tests/mscoree.c
View file @
1b36e9b2
...
@@ -592,18 +592,14 @@ static BOOL compile_cs(const WCHAR *source, const WCHAR *target, const WCHAR *ty
...
@@ -592,18 +592,14 @@ static BOOL compile_cs(const WCHAR *source, const WCHAR *target, const WCHAR *ty
return
ret
;
return
ret
;
}
}
static
BOOL
create_new_dir
(
WCHAR
newdir
[
MAX_PATH
],
const
WCHAR
*
parent
,
static
BOOL
create_new_dir
(
WCHAR
newdir
[
MAX_PATH
],
const
WCHAR
*
prefix
)
const
WCHAR
*
prefix
)
{
{
WCHAR
path
[
MAX_PATH
];
WCHAR
path
[
MAX_PATH
];
BOOL
try_tmpdir
=
TRUE
;
BOOL
try_tmpdir
=
TRUE
;
static
unsigned
i
=
0
;
static
unsigned
i
=
0
;
if
(
!
parent
)
GetCurrentDirectoryW
(
ARRAY_SIZE
(
path
),
path
);
{
GetCurrentDirectoryW
(
ARRAY_SIZE
(
path
),
path
);
parent
=
path
;
}
while
(
1
)
while
(
1
)
{
{
swprintf
(
newdir
,
MAX_PATH
,
L"%s
\\
%s%04d"
,
path
,
prefix
,
i
);
swprintf
(
newdir
,
MAX_PATH
,
L"%s
\\
%s%04d"
,
path
,
prefix
,
i
);
...
@@ -617,7 +613,6 @@ static BOOL create_new_dir(WCHAR newdir[MAX_PATH], const WCHAR* parent,
...
@@ -617,7 +613,6 @@ static BOOL create_new_dir(WCHAR newdir[MAX_PATH], const WCHAR* parent,
try_tmpdir
=
FALSE
;
try_tmpdir
=
FALSE
;
GetTempPathW
(
ARRAY_SIZE
(
path
),
path
);
GetTempPathW
(
ARRAY_SIZE
(
path
),
path
);
path
[
wcslen
(
path
)
-
1
]
=
0
;
/* redundant trailing backslash */
path
[
wcslen
(
path
)
-
1
]
=
0
;
/* redundant trailing backslash */
parent
=
path
;
break
;
break
;
case
ERROR_ALREADY_EXISTS
:
case
ERROR_ALREADY_EXISTS
:
i
++
;
i
++
;
...
@@ -638,7 +633,7 @@ static void test_loadpaths_execute(const WCHAR *exe_name, const WCHAR *dll_name,
...
@@ -638,7 +633,7 @@ static void test_loadpaths_execute(const WCHAR *exe_name, const WCHAR *dll_name,
DWORD
exit_code
=
0xdeadbeef
;
DWORD
exit_code
=
0xdeadbeef
;
BOOL
ret
;
BOOL
ret
;
ok
(
create_new_dir
(
tmpdir
,
NULL
,
L"loadpaths"
),
ok
(
create_new_dir
(
tmpdir
,
L"loadpaths"
),
"failed to create a new dir %lu
\n
"
,
GetLastError
());
"failed to create a new dir %lu
\n
"
,
GetLastError
());
end
=
tmpdir
+
wcslen
(
tmpdir
);
end
=
tmpdir
+
wcslen
(
tmpdir
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment