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
f77baaa8
Commit
f77baaa8
authored
Jul 20, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bb6398d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
asmcache.c
dlls/fusion/asmcache.c
+4
-4
fusion.c
dlls/fusion/fusion.c
+5
-5
No files found.
dlls/fusion/asmcache.c
View file @
f77baaa8
...
...
@@ -117,14 +117,14 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version,
if
(
!
strcmp
(
version
,
"v4.0.30319"
))
{
strcpyW
(
dir
+
len
,
dotnet
);
len
+=
sizeof
(
dotnet
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
dotnet
)
-
1
;
strcpyW
(
dir
+
len
,
gac
+
1
);
len
+=
sizeof
(
gac
)
/
sizeof
(
WCHAR
)
-
2
;
len
+=
ARRAY_SIZE
(
gac
)
-
2
;
}
else
{
strcpyW
(
dir
+
len
,
gac
);
len
+=
sizeof
(
gac
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
gac
)
-
1
;
}
switch
(
architecture
)
{
...
...
@@ -433,7 +433,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
WCHAR
asmdir
[
MAX_PATH
],
*
p
,
**
external_files
=
NULL
,
*
dst_dir
=
NULL
;
PEKIND
architecture
;
char
*
clr_version
;
DWORD
i
,
count
=
0
,
src_len
,
dst_len
=
sizeof
(
format_v40
)
/
sizeof
(
format_v40
[
0
]
);
DWORD
i
,
count
=
0
,
src_len
,
dst_len
=
ARRAY_SIZE
(
format_v40
);
HRESULT
hr
;
TRACE
(
"(%p, %d, %s, %p)
\n
"
,
iface
,
dwFlags
,
...
...
dlls/fusion/fusion.c
View file @
f77baaa8
...
...
@@ -144,9 +144,9 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
case
ASM_CACHE_GAC
:
{
strcpyW
(
path
+
len
,
assembly
);
len
+=
sizeof
(
assembly
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
assembly
)
-
1
;
strcpyW
(
path
+
len
,
gac
);
len
+=
sizeof
(
gac
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
gac
)
-
1
;
break
;
}
case
ASM_CACHE_DOWNLOAD
:
...
...
@@ -156,13 +156,13 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
}
case
ASM_CACHE_ROOT
:
strcpyW
(
path
+
len
,
assembly
);
len
+=
sizeof
(
assembly
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
assembly
)
-
1
;
break
;
case
ASM_CACHE_ROOT_EX
:
strcpyW
(
path
+
len
,
dotnet
);
len
+=
sizeof
(
dotnet
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
dotnet
)
-
1
;
strcpyW
(
path
+
len
,
assembly
);
len
+=
sizeof
(
assembly
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
ARRAY_SIZE
(
assembly
)
-
1
;
break
;
default:
return
E_INVALIDARG
;
...
...
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