Commit 3fd8c85f authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

rpcrt4: Replace RPCRT4_strndupA with strdup.

parent 07d0f1f0
...@@ -43,19 +43,6 @@ ...@@ -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( ...@@ -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 ...@@ -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;
......
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