Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c1280861
Commit
c1280861
authored
Jul 26, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage.dll16: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5bd699e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
storage.c
dlls/storage.dll16/storage.c
+8
-8
No files found.
dlls/storage.dll16/storage.c
View file @
c1280861
...
...
@@ -776,8 +776,8 @@ STORAGE_init_storage(stream_access16 *str) {
/* block 1 is the root directory entry */
memset
(
block
,
0x00
,
sizeof
(
block
));
stde
=
(
struct
storage_pps_entry
*
)
block
;
MultiByteToWideChar
(
CP_ACP
,
0
,
"RootEntry"
,
-
1
,
stde
->
pps_rawname
,
sizeof
(
stde
->
pps_rawname
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
"RootEntry"
,
-
1
,
stde
->
pps_rawname
,
ARRAY_SIZE
(
stde
->
pps_rawname
));
stde
->
pps_sizeofname
=
(
strlenW
(
stde
->
pps_rawname
)
+
1
)
*
sizeof
(
WCHAR
);
stde
->
pps_type
=
5
;
stde
->
pps_dir
=
-
1
;
...
...
@@ -1750,8 +1750,8 @@ HRESULT CDECL IStorage16_fnCreateStorage(IStorage16 *iface, LPCOLESTR16 pwcsName
assert
(
ret
);
nPPSEntries
=
STORAGE_get_pps_entry
(
&
lpstg
->
str
,
ppsent
,
&
(
lpstg
->
stde
));
assert
(
nPPSEntries
==
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
lpstg
->
stde
.
pps_rawname
,
sizeof
(
lpstg
->
stde
.
pps_rawname
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
lpstg
->
stde
.
pps_rawname
,
ARRAY_SIZE
(
lpstg
->
stde
.
pps_rawname
));
lpstg
->
stde
.
pps_sizeofname
=
(
strlenW
(
lpstg
->
stde
.
pps_rawname
)
+
1
)
*
sizeof
(
WCHAR
);
lpstg
->
stde
.
pps_next
=
-
1
;
lpstg
->
stde
.
pps_prev
=
-
1
;
...
...
@@ -1813,8 +1813,8 @@ HRESULT CDECL IStorage16_fnCreateStream(IStorage16 *iface, LPCOLESTR16 pwcsName,
assert
(
ret
);
nPPSEntries
=
STORAGE_get_pps_entry
(
&
lpstr
->
str
,
ppsent
,
&
(
lpstr
->
stde
));
assert
(
nPPSEntries
==
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
lpstr
->
stde
.
pps_rawname
,
sizeof
(
lpstr
->
stde
.
pps_rawname
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
lpstr
->
stde
.
pps_rawname
,
ARRAY_SIZE
(
lpstr
->
stde
.
pps_rawname
));
lpstr
->
stde
.
pps_sizeofname
=
(
strlenW
(
lpstr
->
stde
.
pps_rawname
)
+
1
)
*
sizeof
(
WCHAR
);
lpstr
->
stde
.
pps_next
=
-
1
;
lpstr
->
stde
.
pps_prev
=
-
1
;
...
...
@@ -1855,7 +1855,7 @@ HRESULT CDECL IStorage16_fnOpenStorage(IStorage16 *iface, LPCOLESTR16 pwcsName,
lpstg
->
str
.
lockbytes
=
This
->
str
.
lockbytes
;
_ilockbytes16_addref
(
This
->
str
.
lockbytes
);
}
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
name
,
sizeof
(
name
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
name
,
ARRAY_SIZE
(
name
));
newpps
=
STORAGE_look_for_named_pps
(
&
lpstg
->
str
,
This
->
stde
.
pps_dir
,
name
);
if
(
newpps
==-
1
)
{
IStorage16_fnRelease
(
&
lpstg
->
IStorage16_iface
);
...
...
@@ -1897,7 +1897,7 @@ HRESULT CDECL IStorage16_fnOpenStream(IStorage16 *iface, LPCOLESTR16 pwcsName, v
lpstr
->
str
.
lockbytes
=
This
->
str
.
lockbytes
;
_ilockbytes16_addref
(
This
->
str
.
lockbytes
);
}
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
name
,
sizeof
(
name
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pwcsName
,
-
1
,
name
,
ARRAY_SIZE
(
name
));
newpps
=
STORAGE_look_for_named_pps
(
&
lpstr
->
str
,
This
->
stde
.
pps_dir
,
name
);
if
(
newpps
==-
1
)
{
IStream16_fnRelease
(
&
lpstr
->
IStream16_iface
);
...
...
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