1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

libwbclient: Correctly order the wbcAllocateMemory args

In these cases, it does not make a functional difference.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Nov 27 19:56:02 CET 2010 on sn-devel-104
This commit is contained in:
Volker Lendecke 2010-11-27 19:07:40 +01:00 committed by Volker Lendecke
parent a642cb5a92
commit 87c67433c8
2 changed files with 11 additions and 11 deletions

View File

@ -87,7 +87,7 @@ static wbcErr wbc_create_auth_info(const struct winbindd_response *resp,
uint32_t j;
i = (struct wbcAuthUserInfo *)wbcAllocateMemory(
sizeof(struct wbcAuthUserInfo), 1,
1, sizeof(struct wbcAuthUserInfo),
wbcAuthUserInfoDestructor);
BAIL_ON_PTR_ERROR(i, wbc_status);
@ -248,7 +248,7 @@ static wbcErr wbc_create_error_info(const struct winbindd_response *resp,
struct wbcAuthErrorInfo *e;
e = (struct wbcAuthErrorInfo *)wbcAllocateMemory(
sizeof(struct wbcAuthErrorInfo), 1,
1, sizeof(struct wbcAuthErrorInfo),
wbcAuthErrorInfoDestructor);
BAIL_ON_PTR_ERROR(e, wbc_status);
@ -275,7 +275,7 @@ static wbcErr wbc_create_password_policy_info(const struct winbindd_response *re
struct wbcUserPasswordPolicyInfo *i;
i = (struct wbcUserPasswordPolicyInfo *)wbcAllocateMemory(
sizeof(struct wbcUserPasswordPolicyInfo), 1, NULL);
1, sizeof(struct wbcUserPasswordPolicyInfo), NULL);
BAIL_ON_PTR_ERROR(i, wbc_status);
i->min_passwordage = resp->data.auth.policy.min_passwordage;
@ -306,7 +306,7 @@ static wbcErr wbc_create_logon_info(struct winbindd_response *resp,
struct wbcLogonUserInfo *i;
i = (struct wbcLogonUserInfo *)wbcAllocateMemory(
sizeof(struct wbcLogonUserInfo), 1,
1, sizeof(struct wbcLogonUserInfo),
wbcLogonUserInfoDestructor);
BAIL_ON_PTR_ERROR(i, wbc_status);
@ -1241,7 +1241,7 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params,
}
result = (struct wbcCredentialCacheInfo *)wbcAllocateMemory(
sizeof(struct wbcCredentialCacheInfo), 1,
1, sizeof(struct wbcCredentialCacheInfo),
wbcCredentialCacheInfoDestructor);
if (result == NULL) {
status = WBC_ERR_NO_MEMORY;

View File

@ -74,7 +74,7 @@ wbcErr wbcInterfaceDetails(struct wbcInterfaceDetails **_details)
ZERO_STRUCT(response);
info = (struct wbcInterfaceDetails *)wbcAllocateMemory(
sizeof(struct wbcInterfaceDetails), 1,
1, sizeof(struct wbcInterfaceDetails),
wbcInterfaceDetailsDestructor);
BAIL_ON_PTR_ERROR(info, wbc_status);
@ -173,7 +173,7 @@ wbcErr wbcDomainInfo(const char *domain, struct wbcDomainInfo **dinfo)
BAIL_ON_WBC_ERROR(wbc_status);
info = (struct wbcDomainInfo *)wbcAllocateMemory(
sizeof(struct wbcDomainInfo), 1, wbcDomainInfoDestructor);
1, sizeof(struct wbcDomainInfo), wbcDomainInfoDestructor);
BAIL_ON_PTR_ERROR(info, wbc_status);
info->short_name = strdup(response.data.domain_info.name);
@ -442,7 +442,7 @@ wbcErr wbcListTrusts(struct wbcDomainInfo **domains, size_t *num_domains)
}
d_list = (struct wbcDomainInfo *)wbcAllocateMemory(
sizeof(struct wbcDomainInfo), response.data.num_entries + 1,
response.data.num_entries + 1,sizeof(struct wbcDomainInfo),
wbcDomainInfoListDestructor);
BAIL_ON_PTR_ERROR(d_list, wbc_status);
@ -511,7 +511,7 @@ wbcErr wbcLookupDomainController(const char *domain,
request.flags = flags;
dc = (struct wbcDomainControllerInfo *)wbcAllocateMemory(
sizeof(struct wbcDomainControllerInfo), 1,
1, sizeof(struct wbcDomainControllerInfo),
wbcDomainControllerInfoDestructor);
BAIL_ON_PTR_ERROR(dc, wbc_status);
@ -554,7 +554,7 @@ static wbcErr wbc_create_domain_controller_info_ex(const struct winbindd_respons
struct wbcGuid guid;
i = (struct wbcDomainControllerInfoEx *)wbcAllocateMemory(
sizeof(struct wbcDomainControllerInfoEx), 1,
1, sizeof(struct wbcDomainControllerInfoEx),
wbcDomainControllerInfoExDestructor);
BAIL_ON_PTR_ERROR(i, wbc_status);
@ -698,7 +698,7 @@ wbcErr wbcAddNamedBlob(size_t *num_blobs,
* wbcNamedBlobDestructor
*/
blobs = (struct wbcNamedBlob *)wbcAllocateMemory(
sizeof(struct wbcNamedBlob), *num_blobs + 2,
*num_blobs + 2, sizeof(struct wbcNamedBlob),
wbcNamedBlobDestructor);
if (*pblobs != NULL) {