rpcrt4: Replace RPCRT4_strndupA with strdup.
This commit is contained in:
parent
07d0f1f0c0
commit
3fd8c85fd1
2 changed files with 3 additions and 17 deletions
|
@ -43,19 +43,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
|
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
|
||||||
|
|
||||||
LPSTR RPCRT4_strndupA(LPCSTR src, INT slen)
|
|
||||||
{
|
|
||||||
DWORD len;
|
|
||||||
LPSTR s;
|
|
||||||
if (!src) return NULL;
|
|
||||||
if (slen == -1) slen = strlen(src);
|
|
||||||
len = slen;
|
|
||||||
s = malloc(len + 1);
|
|
||||||
memcpy(s, src, len);
|
|
||||||
s[len] = 0;
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
LPSTR RPCRT4_strdupWtoA(LPCWSTR src)
|
LPSTR RPCRT4_strdupWtoA(LPCWSTR src)
|
||||||
{
|
{
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
@ -992,9 +979,9 @@ RPC_STATUS RPC_ENTRY RpcBindingCopy(
|
||||||
|
|
||||||
DestBinding->ObjectUuid = SrcBinding->ObjectUuid;
|
DestBinding->ObjectUuid = SrcBinding->ObjectUuid;
|
||||||
DestBinding->BlockingFn = SrcBinding->BlockingFn;
|
DestBinding->BlockingFn = SrcBinding->BlockingFn;
|
||||||
DestBinding->Protseq = RPCRT4_strndupA(SrcBinding->Protseq, -1);
|
DestBinding->Protseq = strdup(SrcBinding->Protseq);
|
||||||
DestBinding->NetworkAddr = RPCRT4_strndupA(SrcBinding->NetworkAddr, -1);
|
DestBinding->NetworkAddr = strdup(SrcBinding->NetworkAddr);
|
||||||
DestBinding->Endpoint = RPCRT4_strndupA(SrcBinding->Endpoint, -1);
|
DestBinding->Endpoint = strdup(SrcBinding->Endpoint);
|
||||||
DestBinding->NetworkOptions = wcsdup(SrcBinding->NetworkOptions);
|
DestBinding->NetworkOptions = wcsdup(SrcBinding->NetworkOptions);
|
||||||
DestBinding->CookieAuth = wcsdup(SrcBinding->CookieAuth);
|
DestBinding->CookieAuth = wcsdup(SrcBinding->CookieAuth);
|
||||||
if (SrcBinding->Assoc) SrcBinding->Assoc->refs++;
|
if (SrcBinding->Assoc) SrcBinding->Assoc->refs++;
|
||||||
|
|
|
@ -143,7 +143,6 @@ typedef struct _RpcBinding
|
||||||
LPWSTR CookieAuth;
|
LPWSTR CookieAuth;
|
||||||
} RpcBinding;
|
} RpcBinding;
|
||||||
|
|
||||||
LPSTR RPCRT4_strndupA(LPCSTR src, INT len) DECLSPEC_HIDDEN;
|
|
||||||
LPWSTR RPCRT4_strndupW(LPCWSTR src, INT len) DECLSPEC_HIDDEN;
|
LPWSTR RPCRT4_strndupW(LPCWSTR src, INT len) DECLSPEC_HIDDEN;
|
||||||
LPSTR RPCRT4_strdupWtoA(LPCWSTR src) DECLSPEC_HIDDEN;
|
LPSTR RPCRT4_strdupWtoA(LPCWSTR src) DECLSPEC_HIDDEN;
|
||||||
LPWSTR RPCRT4_strdupAtoW(LPCSTR src) DECLSPEC_HIDDEN;
|
LPWSTR RPCRT4_strdupAtoW(LPCSTR src) DECLSPEC_HIDDEN;
|
||||||
|
|
Loading…
Add table
Reference in a new issue