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
a8510589
Commit
a8510589
authored
Mar 05, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Remove superfluous pointer casts.
parent
258d953a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
26 deletions
+24
-26
access.c
dlls/netapi32/access.c
+2
-3
nbt.c
dlls/netapi32/nbt.c
+13
-13
netbios.c
dlls/netapi32/netbios.c
+1
-1
apibuf.c
dlls/netapi32/tests/apibuf.c
+7
-7
wksta.c
dlls/netapi32/wksta.c
+1
-2
No files found.
dlls/netapi32/access.c
View file @
a8510589
...
...
@@ -658,7 +658,7 @@ NetQueryDisplayInformation(
admin_size
-
sizeof
(
NET_DISPLAY_USER
)
+
guest_size
-
sizeof
(
NET_DISPLAY_USER
),
SortedBuffer
);
inf
=
(
PNET_DISPLAY_USER
)
*
SortedBuffer
;
inf
=
*
SortedBuffer
;
str
=
(
LPWSTR
)
((
PBYTE
)
inf
+
sizeof
(
NET_DISPLAY_USER
)
*
records
);
inf
->
usri1_name
=
str
;
str
=
(
LPWSTR
)
(
...
...
@@ -826,8 +826,7 @@ NET_API_STATUS WINAPI NetUserModalsGet(
}
umi
=
(
USER_MODALS_INFO_2
*
)
*
pbuffer
;
umi
->
usrmod2_domain_id
=
(
PSID
)(
*
pbuffer
+
sizeof
(
USER_MODALS_INFO_2
));
umi
->
usrmod2_domain_id
=
*
pbuffer
+
sizeof
(
USER_MODALS_INFO_2
);
umi
->
usrmod2_domain_name
=
(
LPWSTR
)(
*
pbuffer
+
sizeof
(
USER_MODALS_INFO_2
)
+
GetLengthSid
(
domainIdentifier
));
...
...
dlls/netapi32/nbt.c
View file @
a8510589
...
...
@@ -400,7 +400,7 @@ typedef struct _NetBTNameQueryData {
static
BOOL
NetBTFindNameAnswerCallback
(
void
*
pVoid
,
WORD
answerCount
,
WORD
answerIndex
,
PUCHAR
rData
,
WORD
rLen
)
{
NetBTNameQueryData
*
queryData
=
(
NetBTNameQueryData
*
)
pVoid
;
NetBTNameQueryData
*
queryData
=
pVoid
;
BOOL
ret
;
if
(
queryData
)
...
...
@@ -696,7 +696,7 @@ typedef struct _NetBTNodeQueryData
static
BOOL
NetBTNodeStatusAnswerCallback
(
void
*
pVoid
,
WORD
answerCount
,
WORD
answerIndex
,
PUCHAR
rData
,
WORD
rLen
)
{
NetBTNodeQueryData
*
data
=
(
NetBTNodeQueryData
*
)
pVoid
;
NetBTNodeQueryData
*
data
=
pVoid
;
if
(
data
&&
!
data
->
gotResponse
&&
rData
&&
rLen
>=
1
)
{
...
...
@@ -811,7 +811,7 @@ static UCHAR NetBTAstatRemote(NetBTAdapter *adapter, PNCB ncb)
static
UCHAR
NetBTAstat
(
void
*
adapt
,
PNCB
ncb
)
{
NetBTAdapter
*
adapter
=
(
NetBTAdapter
*
)
adapt
;
NetBTAdapter
*
adapter
=
adapt
;
UCHAR
ret
;
TRACE
(
"adapt %p, NCB %p
\n
"
,
adapt
,
ncb
);
...
...
@@ -856,7 +856,7 @@ static UCHAR NetBTAstat(void *adapt, PNCB ncb)
static
UCHAR
NetBTFindName
(
void
*
adapt
,
PNCB
ncb
)
{
NetBTAdapter
*
adapter
=
(
NetBTAdapter
*
)
adapt
;
NetBTAdapter
*
adapter
=
adapt
;
UCHAR
ret
;
const
NBNameCacheEntry
*
cacheEntry
=
NULL
;
PFIND_NAME_HEADER
foundName
;
...
...
@@ -973,7 +973,7 @@ static UCHAR NetBTSessionReq(SOCKET fd, const UCHAR *calledName,
static
UCHAR
NetBTCall
(
void
*
adapt
,
PNCB
ncb
,
void
**
sess
)
{
NetBTAdapter
*
adapter
=
(
NetBTAdapter
*
)
adapt
;
NetBTAdapter
*
adapter
=
adapt
;
UCHAR
ret
;
const
NBNameCacheEntry
*
cacheEntry
=
NULL
;
...
...
@@ -1074,8 +1074,8 @@ static UCHAR NetBTCall(void *adapt, PNCB ncb, void **sess)
*/
static
UCHAR
NetBTSend
(
void
*
adapt
,
void
*
sess
,
PNCB
ncb
)
{
NetBTAdapter
*
adapter
=
(
NetBTAdapter
*
)
adapt
;
NetBTSession
*
session
=
(
NetBTSession
*
)
sess
;
NetBTAdapter
*
adapter
=
adapt
;
NetBTSession
*
session
=
sess
;
UCHAR
buffer
[
NBSS_HDRSIZE
],
ret
;
int
r
;
WSABUF
wsaBufs
[
2
];
...
...
@@ -1123,8 +1123,8 @@ static UCHAR NetBTSend(void *adapt, void *sess, PNCB ncb)
static
UCHAR
NetBTRecv
(
void
*
adapt
,
void
*
sess
,
PNCB
ncb
)
{
NetBTAdapter
*
adapter
=
(
NetBTAdapter
*
)
adapt
;
NetBTSession
*
session
=
(
NetBTSession
*
)
sess
;
NetBTAdapter
*
adapter
=
adapt
;
NetBTSession
*
session
=
sess
;
UCHAR
buffer
[
NBSS_HDRSIZE
],
ret
;
int
r
;
WSABUF
wsaBufs
[
2
];
...
...
@@ -1231,7 +1231,7 @@ error:
static
UCHAR
NetBTHangup
(
void
*
adapt
,
void
*
sess
)
{
NetBTSession
*
session
=
(
NetBTSession
*
)
sess
;
NetBTSession
*
session
=
sess
;
TRACE
(
"adapt %p, session %p
\n
"
,
adapt
,
session
);
...
...
@@ -1255,7 +1255,7 @@ static void NetBTCleanupAdapter(void *adapt)
TRACE
(
"adapt %p
\n
"
,
adapt
);
if
(
adapt
)
{
NetBTAdapter
*
adapter
=
(
NetBTAdapter
*
)
adapt
;
NetBTAdapter
*
adapter
=
adapt
;
if
(
adapter
->
nameCache
)
NBNameCacheDestroy
(
adapter
->
nameCache
);
...
...
@@ -1310,7 +1310,7 @@ static BOOL NetBTEnumCallback(UCHAR totalLANAs, UCHAR lanaIndex,
ULONG
transport
,
const
NetBIOSAdapterImpl
*
data
,
void
*
closure
)
{
BOOL
ret
;
PMIB_IPADDRTABLE
table
=
(
PMIB_IPADDRTABLE
)
closure
;
PMIB_IPADDRTABLE
table
=
closure
;
if
(
table
&&
data
)
{
...
...
@@ -1319,7 +1319,7 @@ static BOOL NetBTEnumCallback(UCHAR totalLANAs, UCHAR lanaIndex,
ret
=
FALSE
;
for
(
ndx
=
0
;
!
ret
&&
ndx
<
table
->
dwNumEntries
;
ndx
++
)
{
const
NetBTAdapter
*
adapter
=
(
const
NetBTAdapter
*
)
data
->
data
;
const
NetBTAdapter
*
adapter
=
data
->
data
;
if
(
table
->
table
[
ndx
].
dwIndex
==
adapter
->
ipr
.
dwIndex
)
{
...
...
dlls/netapi32/netbios.c
View file @
a8510589
...
...
@@ -762,7 +762,7 @@ static UCHAR nbDispatch(NetBIOSAdapter *adapter, PNCB ncb)
static
DWORD
WINAPI
nbCmdThread
(
LPVOID
lpVoid
)
{
PNCB
ncb
=
(
PNCB
)
lpVoid
;
PNCB
ncb
=
lpVoid
;
if
(
ncb
)
{
...
...
dlls/netapi32/tests/apibuf.c
View file @
a8510589
...
...
@@ -42,12 +42,12 @@ static void run_apibuf_tests(void)
NET_API_STATUS
res
;
/* test normal logic */
ok
(
pNetApiBufferAllocate
(
1024
,
(
LPVOID
*
)
&
p
)
==
NERR_Success
,
ok
(
pNetApiBufferAllocate
(
1024
,
&
p
)
==
NERR_Success
,
"Reserved memory
\n
"
);
ok
(
pNetApiBufferSize
(
p
,
&
dwSize
)
==
NERR_Success
,
"Got size
\n
"
);
ok
(
dwSize
>=
1024
,
"The size is correct
\n
"
);
ok
(
pNetApiBufferReallocate
(
p
,
1500
,
(
LPVOID
*
)
&
p
)
==
NERR_Success
,
ok
(
pNetApiBufferReallocate
(
p
,
1500
,
&
p
)
==
NERR_Success
,
"Reallocated
\n
"
);
ok
(
pNetApiBufferSize
(
p
,
&
dwSize
)
==
NERR_Success
,
"Got size
\n
"
);
ok
(
dwSize
>=
1500
,
"The size is correct
\n
"
);
...
...
@@ -58,14 +58,14 @@ static void run_apibuf_tests(void)
ok
(
pNetApiBufferSize
(
NULL
,
&
dwSize
)
==
ERROR_INVALID_PARAMETER
,
"Error for NULL pointer
\n
"
);
/* border reallocate cases */
ok
(
pNetApiBufferReallocate
(
0
,
1500
,
(
LPVOID
*
)
&
p
)
==
NERR_Success
,
"Reallocate with OldBuffer = NULL failed
\n
"
);
ok
(
pNetApiBufferReallocate
(
0
,
1500
,
&
p
)
==
NERR_Success
,
"Reallocate with OldBuffer = NULL failed
\n
"
);
ok
(
p
!=
NULL
,
"No memory got allocated
\n
"
);
ok
(
pNetApiBufferAllocate
(
1024
,
(
LPVOID
*
)
&
p
)
==
NERR_Success
,
"Memory not reserved
\n
"
);
ok
(
pNetApiBufferReallocate
(
p
,
0
,
(
LPVOID
*
)
&
p
)
==
NERR_Success
,
"Not freed
\n
"
);
ok
(
pNetApiBufferAllocate
(
1024
,
&
p
)
==
NERR_Success
,
"Memory not reserved
\n
"
);
ok
(
pNetApiBufferReallocate
(
p
,
0
,
&
p
)
==
NERR_Success
,
"Not freed
\n
"
);
ok
(
p
==
NULL
,
"Pointer not cleared
\n
"
);
/* 0-length buffer */
ok
(
pNetApiBufferAllocate
(
0
,
(
LPVOID
*
)
&
p
)
==
NERR_Success
,
ok
(
pNetApiBufferAllocate
(
0
,
&
p
)
==
NERR_Success
,
"Reserved memory
\n
"
);
ok
(
pNetApiBufferSize
(
p
,
&
dwSize
)
==
NERR_Success
,
"Got size
\n
"
);
ok
(
dwSize
<
0xFFFFFFFF
,
"The size of the 0-length buffer
\n
"
);
...
...
dlls/netapi32/wksta.c
View file @
a8510589
...
...
@@ -157,8 +157,7 @@ static BOOL WkstaEnumAdaptersCallback(UCHAR totalLANAs, UCHAR lanaIndex,
ULONG
transport
,
const
NetBIOSAdapterImpl
*
data
,
void
*
closure
)
{
BOOL
ret
;
struct
WkstaTransportEnumData
*
enumData
=
(
struct
WkstaTransportEnumData
*
)
closure
;
struct
WkstaTransportEnumData
*
enumData
=
closure
;
if
(
enumData
&&
enumData
->
pbuf
)
{
...
...
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