Commit 2a2a3b4e authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

netapi32: Constify some variables.

parent 814ca129
......@@ -512,7 +512,7 @@ static void ACCESS_QueryGuestDisplayInformation(PNET_DISPLAY_USER *buf, PDWORD p
/************************************************************
* Copies NET_DISPLAY_USER record.
*/
static void ACCESS_CopyDisplayUser(PNET_DISPLAY_USER dest, LPWSTR *dest_buf,
static void ACCESS_CopyDisplayUser(const NET_DISPLAY_USER *dest, LPWSTR *dest_buf,
PNET_DISPLAY_USER src)
{
LPWSTR str = *dest_buf;
......
......@@ -288,7 +288,7 @@ typedef BOOL (*NetBTAnswerCallback)(void *data, WORD answerCount,
* Returns NRC_GOODRET on timeout or a valid response received, something else
* on error.
*/
static UCHAR NetBTWaitForNameResponse(NetBTAdapter *adapter, SOCKET fd,
static UCHAR NetBTWaitForNameResponse(const NetBTAdapter *adapter, SOCKET fd,
DWORD waitUntil, NetBTAnswerCallback answerCallback, void *data)
{
BOOL found = FALSE;
......@@ -424,7 +424,7 @@ static BOOL NetBTFindNameAnswerCallback(void *pVoid, WORD answerCount,
queryData->cacheEntry->numAddresses < answerCount)
{
queryData->cacheEntry->addresses[queryData->cacheEntry->
numAddresses++] = *(PDWORD)(rData + 2);
numAddresses++] = *(const DWORD *)(rData + 2);
ret = queryData->cacheEntry->numAddresses < answerCount;
}
else
......@@ -444,7 +444,7 @@ static BOOL NetBTFindNameAnswerCallback(void *pVoid, WORD answerCount,
* Returns NRC_GOODRET on success, though this may not mean the name was
* resolved--check whether *cacheEntry is NULL.
*/
static UCHAR NetBTNameWaitLoop(NetBTAdapter *adapter, SOCKET fd, PNCB ncb,
static UCHAR NetBTNameWaitLoop(const NetBTAdapter *adapter, SOCKET fd, const NCB *ncb,
DWORD sendTo, BOOL broadcast, DWORD timeout, DWORD maxQueries,
NBNameCacheEntry **cacheEntry)
{
......@@ -1274,7 +1274,7 @@ static void NetBTCleanup(void)
}
}
static UCHAR NetBTRegisterAdapter(PMIB_IPADDRROW ipRow)
static UCHAR NetBTRegisterAdapter(const MIB_IPADDRROW *ipRow)
{
UCHAR ret;
NetBTAdapter *adapter;
......
......@@ -640,7 +640,7 @@ static UCHAR nbInternalHangup(NetBIOSAdapter *adapter, NetBIOSSession *session)
return NRC_GOODRET;
}
static UCHAR nbHangup(NetBIOSAdapter *adapter, PNCB ncb)
static UCHAR nbHangup(NetBIOSAdapter *adapter, const NCB *ncb)
{
UCHAR ret;
NetBIOSSession *session;
......@@ -661,7 +661,7 @@ static UCHAR nbHangup(NetBIOSAdapter *adapter, PNCB ncb)
return ret;
}
void NetBIOSHangupSession(PNCB ncb)
void NetBIOSHangupSession(const NCB *ncb)
{
NetBIOSAdapter *adapter;
......
......@@ -92,7 +92,7 @@ void NetBIOSEnumAdapters(ULONG transport, NetBIOSEnumAdaptersCallback cb,
* This function is intended for use by a transport, if the session is closed
* by some error in the transport layer.
*/
void NetBIOSHangupSession(PNCB ncb);
void NetBIOSHangupSession(const NCB *ncb);
/**
* Functions a transport implementation must implement
......@@ -132,7 +132,7 @@ typedef void (*NetBIOSCleanup)(void);
* some calls (recv) will block indefinitely, so a reset, shutdown, etc. will
* never occur.
*/
#define NCB_CANCELLED(pncb) *(PBOOL)((pncb)->ncb_reserve)
#define NCB_CANCELLED(pncb) *(const BOOL *)((pncb)->ncb_reserve)
typedef UCHAR (*NetBIOSAstat)(void *adapter, PNCB ncb);
typedef UCHAR (*NetBIOSFindName)(void *adapter, PNCB ncb);
......
......@@ -71,7 +71,7 @@ BOOL NETAPI_IsLocalComputer(LPCWSTR ServerName)
}
}
static void wprint_mac(WCHAR* buffer, int len, PMIB_IFROW ifRow)
static void wprint_mac(WCHAR* buffer, int len, const MIB_IFROW *ifRow)
{
int i;
unsigned char val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment