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
4d605e86
Commit
4d605e86
authored
Dec 12, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Get rid of casts in WORD serialization helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
46ba55be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
stg_prop.c
dlls/ole32/stg_prop.c
+3
-4
storage32.c
dlls/ole32/storage32.c
+3
-3
storage32.h
dlls/ole32/storage32.h
+1
-1
No files found.
dlls/ole32/stg_prop.c
View file @
4d605e86
...
...
@@ -1708,9 +1708,8 @@ static void PropertyStorage_MakeHeader(PropertyStorage_impl *This,
PROPERTYSETHEADER
*
hdr
)
{
assert
(
hdr
);
StorageUtl_WriteWord
((
BYTE
*
)
&
hdr
->
wByteOrder
,
0
,
PROPSETHDR_BYTEORDER_MAGIC
);
StorageUtl_WriteWord
((
BYTE
*
)
&
hdr
->
wFormat
,
0
,
This
->
format
);
StorageUtl_WriteWord
(
&
hdr
->
wByteOrder
,
0
,
PROPSETHDR_BYTEORDER_MAGIC
);
StorageUtl_WriteWord
(
&
hdr
->
wFormat
,
0
,
This
->
format
);
StorageUtl_WriteDWord
(
&
hdr
->
dwOSVer
,
0
,
This
->
originatorOS
);
StorageUtl_WriteGUID
((
BYTE
*
)
&
hdr
->
clsid
,
0
,
&
This
->
clsid
);
StorageUtl_WriteDWord
(
&
hdr
->
reserved
,
0
,
1
);
...
...
@@ -1934,7 +1933,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
{
WORD
wTemp
;
StorageUtl_WriteWord
(
(
LPBYTE
)
&
wTemp
,
0
,
var
->
u
.
iVal
);
StorageUtl_WriteWord
(
&
wTemp
,
0
,
var
->
u
.
iVal
);
hr
=
IStream_Write
(
This
->
stm
,
&
wTemp
,
sizeof
(
wTemp
),
&
count
);
bytesWritten
=
count
;
break
;
...
...
dlls/ole32/storage32.c
View file @
4d605e86
...
...
@@ -6948,10 +6948,10 @@ void StorageUtl_ReadWord(const BYTE* buffer, ULONG offset, WORD* value)
*
value
=
lendian16toh
(
tmp
);
}
void
StorageUtl_WriteWord
(
BYTE
*
buffer
,
ULONG
offset
,
WORD
value
)
void
StorageUtl_WriteWord
(
void
*
buffer
,
ULONG
offset
,
WORD
value
)
{
value
=
htole16
(
value
);
memcpy
(
buffer
+
offset
,
&
value
,
sizeof
(
WORD
));
value
=
htole16
(
value
);
memcpy
((
BYTE
*
)
buffer
+
offset
,
&
value
,
sizeof
(
WORD
));
}
void
StorageUtl_ReadDWord
(
const
BYTE
*
buffer
,
ULONG
offset
,
DWORD
*
value
)
...
...
dlls/ole32/storage32.h
View file @
4d605e86
...
...
@@ -556,7 +556,7 @@ StgStreamImpl* StgStreamImpl_Construct(
* worry about bit order
*/
void
StorageUtl_ReadWord
(
const
BYTE
*
buffer
,
ULONG
offset
,
WORD
*
value
)
DECLSPEC_HIDDEN
;
void
StorageUtl_WriteWord
(
BYTE
*
buffer
,
ULONG
offset
,
WORD
value
)
DECLSPEC_HIDDEN
;
void
StorageUtl_WriteWord
(
void
*
buffer
,
ULONG
offset
,
WORD
value
)
DECLSPEC_HIDDEN
;
void
StorageUtl_ReadDWord
(
const
BYTE
*
buffer
,
ULONG
offset
,
DWORD
*
value
)
DECLSPEC_HIDDEN
;
void
StorageUtl_WriteDWord
(
void
*
buffer
,
ULONG
offset
,
DWORD
value
)
DECLSPEC_HIDDEN
;
void
StorageUtl_ReadULargeInteger
(
const
BYTE
*
buffer
,
ULONG
offset
,
...
...
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