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
c0ba6509
Commit
c0ba6509
authored
Feb 27, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom: Use ARRAY_SIZE() macro.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db2a3b70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
shell.c
dlls/wshom.ocx/shell.c
+4
-4
wshom_main.c
dlls/wshom.ocx/wshom_main.c
+1
-1
wshom_private.h
dlls/wshom.ocx/wshom_private.h
+2
-0
No files found.
dlls/wshom.ocx/shell.c
View file @
c0ba6509
...
...
@@ -859,7 +859,7 @@ static HRESULT WINAPI WshShortcut_get_Arguments(IWshShortcut *iface, BSTR *Argum
*
Arguments
=
NULL
;
hr
=
IShellLinkW_GetArguments
(
This
->
link
,
buffW
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
));
hr
=
IShellLinkW_GetArguments
(
This
->
link
,
buffW
,
ARRAY_SIZE
(
buffW
));
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -917,7 +917,7 @@ static HRESULT WINAPI WshShortcut_get_IconLocation(IWshShortcut *iface, BSTR *Ic
if
(
!
IconPath
)
return
E_POINTER
;
hr
=
IShellLinkW_GetIconLocation
(
This
->
link
,
buffW
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
),
&
icon
);
hr
=
IShellLinkW_GetIconLocation
(
This
->
link
,
buffW
,
ARRAY_SIZE
(
buffW
),
&
icon
);
if
(
FAILED
(
hr
))
return
hr
;
sprintfW
(
pathW
,
fmtW
,
buffW
,
icon
);
...
...
@@ -1006,7 +1006,7 @@ static HRESULT WINAPI WshShortcut_get_WorkingDirectory(IWshShortcut *iface, BSTR
return
E_POINTER
;
*
WorkingDirectory
=
NULL
;
hr
=
IShellLinkW_GetWorkingDirectory
(
This
->
link
,
buffW
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
));
hr
=
IShellLinkW_GetWorkingDirectory
(
This
->
link
,
buffW
,
ARRAY_SIZE
(
buffW
));
if
(
FAILED
(
hr
))
return
hr
;
*
WorkingDirectory
=
SysAllocString
(
buffW
);
...
...
@@ -1395,7 +1395,7 @@ static HKEY get_root_key(const WCHAR *path)
};
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
rootkeys
)
/
sizeof
(
rootkeys
[
0
]
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
rootkeys
);
i
++
)
{
if
(
!
strncmpW
(
path
,
rootkeys
[
i
].
full
,
strlenW
(
rootkeys
[
i
].
full
)))
return
rootkeys
[
i
].
hkey
;
if
(
rootkeys
[
i
].
abbrev
[
0
]
&&
!
strncmpW
(
path
,
rootkeys
[
i
].
abbrev
,
strlenW
(
rootkeys
[
i
].
abbrev
)))
...
...
dlls/wshom.ocx/wshom_main.c
View file @
c0ba6509
...
...
@@ -107,7 +107,7 @@ void release_typelib(void)
if
(
!
typelib
)
return
;
for
(
i
=
0
;
i
<
sizeof
(
typeinfos
)
/
sizeof
(
*
typeinfos
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
typeinfos
);
i
++
)
if
(
typeinfos
[
i
])
ITypeInfo_Release
(
typeinfos
[
i
]);
...
...
dlls/wshom.ocx/wshom_private.h
View file @
c0ba6509
...
...
@@ -25,6 +25,8 @@
#include "ole2.h"
#include "olectl.h"
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
/* typelibs */
typedef
enum
tid_t
{
NULL_tid
,
...
...
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