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
aedfc471
Commit
aedfc471
authored
Apr 30, 2004
by
Marcus Meissner
Committed by
Alexandre Julliard
Apr 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed lvalue casts.
parent
7a58c6ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
marshal.c
dlls/ole32/marshal.c
+2
-1
storage.c
dlls/ole32/storage.c
+10
-8
No files found.
dlls/ole32/marshal.c
View file @
aedfc471
...
...
@@ -379,7 +379,8 @@ CoGetStandardMarshal(
TRACE
(
"(%s,%p,%lx,%p,%lx,%p)
\n
"
,
debugstr_guid
(
riid
),
pUnk
,
dwDestContext
,
pvDestContext
,
mshlflags
,
pMarshal
);
dm
=
(
StdMarshalImpl
*
)
*
pMarshal
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
StdMarshalImpl
));
*
pMarshal
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
StdMarshalImpl
));
dm
=
(
StdMarshalImpl
*
)
*
pMarshal
;
if
(
!
dm
)
return
E_FAIL
;
dm
->
lpvtbl
=
&
stdmvtbl
;
dm
->
ref
=
1
;
...
...
dlls/ole32/storage.c
View file @
aedfc471
...
...
@@ -1061,6 +1061,7 @@ HRESULT WINAPI IStream16_fnRead(
BYTE
block
[
BIGSIZE
];
ULONG
*
bytesread
=
pcbRead
,
xxread
;
int
blocknr
;
LPBYTE
pbv
=
pv
;
TRACE_
(
relay
)(
"(%p)->(%p,%ld,%p)
\n
"
,
This
,
pv
,
cb
,
pcbRead
);
if
(
!
pcbRead
)
bytesread
=&
xxread
;
...
...
@@ -1081,9 +1082,9 @@ HRESULT WINAPI IStream16_fnRead(
cc
=
cb
;
if
(
cc
>
SMALLSIZE
-
(
This
->
offset
.
u
.
LowPart
&
(
SMALLSIZE
-
1
)))
cc
=
SMALLSIZE
-
(
This
->
offset
.
u
.
LowPart
&
(
SMALLSIZE
-
1
));
memcpy
(
(
LPBYTE
)
p
v
,
block
+
(
This
->
offset
.
u
.
LowPart
&
(
SMALLSIZE
-
1
)),
cc
);
memcpy
(
pb
v
,
block
+
(
This
->
offset
.
u
.
LowPart
&
(
SMALLSIZE
-
1
)),
cc
);
This
->
offset
.
u
.
LowPart
+=
cc
;
(
LPBYTE
)
p
v
+=
cc
;
pb
v
+=
cc
;
*
bytesread
+=
cc
;
cb
-=
cc
;
blocknr
=
STORAGE_get_next_small_blocknr
(
This
->
hf
,
blocknr
);
...
...
@@ -1101,9 +1102,9 @@ HRESULT WINAPI IStream16_fnRead(
cc
=
cb
;
if
(
cc
>
BIGSIZE
-
(
This
->
offset
.
u
.
LowPart
&
(
BIGSIZE
-
1
)))
cc
=
BIGSIZE
-
(
This
->
offset
.
u
.
LowPart
&
(
BIGSIZE
-
1
));
memcpy
(
(
LPBYTE
)
p
v
,
block
+
(
This
->
offset
.
u
.
LowPart
&
(
BIGSIZE
-
1
)),
cc
);
memcpy
(
pb
v
,
block
+
(
This
->
offset
.
u
.
LowPart
&
(
BIGSIZE
-
1
)),
cc
);
This
->
offset
.
u
.
LowPart
+=
cc
;
(
LPBYTE
)
p
v
+=
cc
;
pb
v
+=
cc
;
*
bytesread
+=
cc
;
cb
-=
cc
;
blocknr
=
STORAGE_get_next_big_blocknr
(
This
->
hf
,
blocknr
);
...
...
@@ -1123,6 +1124,7 @@ HRESULT WINAPI IStream16_fnWrite(
ULONG
*
byteswritten
=
pcbWrite
,
xxwritten
;
int
oldsize
,
newsize
,
i
,
curoffset
=
0
,
lastblocknr
,
blocknr
,
cc
;
HANDLE
hf
=
This
->
hf
;
LPBYTE
pbv
=
(
LPBYTE
)
pv
;
if
(
!
pcbWrite
)
byteswritten
=&
xxwritten
;
*
byteswritten
=
0
;
...
...
@@ -1340,14 +1342,14 @@ HRESULT WINAPI IStream16_fnWrite(
if
(
cc
>
cb
)
cc
=
cb
;
memcpy
(
((
LPBYTE
)
block
)
+
(
This
->
offset
.
u
.
LowPart
&
(
SMALLSIZE
-
1
)),
(
LPBYTE
)((
char
*
)
pv
+
curoffset
)
,
pbv
+
curoffset
,
cc
);
if
(
!
STORAGE_put_small_block
(
hf
,
blocknr
,
block
))
return
E_FAIL
;
cb
-=
cc
;
curoffset
+=
cc
;
(
LPBYTE
)
pv
+=
cc
;
pbv
+=
cc
;
This
->
offset
.
u
.
LowPart
+=
cc
;
*
byteswritten
+=
cc
;
blocknr
=
STORAGE_get_next_small_blocknr
(
hf
,
blocknr
);
...
...
@@ -1368,14 +1370,14 @@ HRESULT WINAPI IStream16_fnWrite(
if
(
cc
>
cb
)
cc
=
cb
;
memcpy
(
((
LPBYTE
)
block
)
+
(
This
->
offset
.
u
.
LowPart
&
(
BIGSIZE
-
1
)),
(
LPBYTE
)((
char
*
)
pv
+
curoffset
)
,
pbv
+
curoffset
,
cc
);
if
(
!
STORAGE_put_big_block
(
hf
,
blocknr
,
block
))
return
E_FAIL
;
cb
-=
cc
;
curoffset
+=
cc
;
(
LPBYTE
)
pv
+=
cc
;
pbv
+=
cc
;
This
->
offset
.
u
.
LowPart
+=
cc
;
*
byteswritten
+=
cc
;
blocknr
=
STORAGE_get_next_big_blocknr
(
hf
,
blocknr
);
...
...
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