mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
samba: pass down size_t instead of int to add_string_to_array().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104
This commit is contained in:
parent
ee8ddb8e02
commit
a62cc2ce44
@ -104,7 +104,7 @@ struct ldap_SearchRequest {
|
|||||||
uint32_t sizelimit;
|
uint32_t sizelimit;
|
||||||
bool attributesonly;
|
bool attributesonly;
|
||||||
struct ldb_parse_tree *tree;
|
struct ldb_parse_tree *tree;
|
||||||
int num_attributes;
|
size_t num_attributes;
|
||||||
const char * const *attributes;
|
const char * const *attributes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
|
|||||||
name[PTR_DIFF(p, dirent->d_name)] = 0;
|
name[PTR_DIFF(p, dirent->d_name)] = 0;
|
||||||
|
|
||||||
if (!add_string_to_array(mem_ctx, name, ext_list,
|
if (!add_string_to_array(mem_ctx, name, ext_list,
|
||||||
(int *)ext_list_len)) {
|
ext_list_len)) {
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
@ -586,7 +586,7 @@ bool parse_logentry( TALLOC_CTX *mem_ctx, char *line, struct eventlog_Record_tdb
|
|||||||
}
|
}
|
||||||
} else if ( 0 == strncmp( start, "STR", stop - start ) ) {
|
} else if ( 0 == strncmp( start, "STR", stop - start ) ) {
|
||||||
size_t tmp_len;
|
size_t tmp_len;
|
||||||
int num_of_strings;
|
size_t num_of_strings;
|
||||||
/* skip past initial ":" */
|
/* skip past initial ":" */
|
||||||
stop++;
|
stop++;
|
||||||
/* now skip any other leading whitespace */
|
/* now skip any other leading whitespace */
|
||||||
|
@ -3288,7 +3288,7 @@ ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
|
|||||||
|
|
||||||
if (!add_string_to_array(mem_ctx, dn,
|
if (!add_string_to_array(mem_ctx, dn,
|
||||||
(const char ***)ous,
|
(const char ***)ous,
|
||||||
(int *)num_ous)) {
|
num_ous)) {
|
||||||
TALLOC_FREE(dn);
|
TALLOC_FREE(dn);
|
||||||
ads_msgfree(ads, res);
|
ads_msgfree(ads, res);
|
||||||
return ADS_ERROR(LDAP_NO_MEMORY);
|
return ADS_ERROR(LDAP_NO_MEMORY);
|
||||||
|
@ -423,7 +423,7 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
|
|||||||
ok = ads_element_in_array(spn_array, num_spns, spn);
|
ok = ads_element_in_array(spn_array, num_spns, spn);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
ok = add_string_to_array(spn_array, spn,
|
ok = add_string_to_array(spn_array, spn,
|
||||||
&spn_array, (int *)&num_spns);
|
&spn_array, &num_spns);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
|
return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
|
||||||
}
|
}
|
||||||
@ -448,7 +448,7 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
|
|||||||
ok = ads_element_in_array(spn_array, num_spns, spn);
|
ok = ads_element_in_array(spn_array, num_spns, spn);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
ok = add_string_to_array(spn_array, spn,
|
ok = add_string_to_array(spn_array, spn,
|
||||||
&spn_array, (int *)&num_spns);
|
&spn_array, &num_spns);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
|
return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
@ -3335,7 +3335,7 @@ static NTSTATUS init_lsa_right_set(TALLOC_CTX *mem_ctx,
|
|||||||
uint32 i;
|
uint32 i;
|
||||||
const char *privname;
|
const char *privname;
|
||||||
const char **privname_array = NULL;
|
const char **privname_array = NULL;
|
||||||
int num_priv = 0;
|
size_t num_priv = 0;
|
||||||
|
|
||||||
for (i=0; i<privileges->count; i++) {
|
for (i=0; i<privileges->count; i++) {
|
||||||
if (privileges->set[i].luid.high) {
|
if (privileges->set[i].luid.high) {
|
||||||
|
@ -397,7 +397,7 @@ NTSTATUS _netr_NetrEnumerateTrustedDomains(struct pipes_struct *p,
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
NTSTATUS result = NT_STATUS_OK;
|
NTSTATUS result = NT_STATUS_OK;
|
||||||
DATA_BLOB blob;
|
DATA_BLOB blob;
|
||||||
int num_domains = 0;
|
size_t num_domains = 0;
|
||||||
const char **trusted_domains = NULL;
|
const char **trusted_domains = NULL;
|
||||||
struct lsa_DomainList domain_list;
|
struct lsa_DomainList domain_list;
|
||||||
struct dcerpc_binding_handle *h = NULL;
|
struct dcerpc_binding_handle *h = NULL;
|
||||||
|
@ -4902,7 +4902,8 @@ static WERROR string_array_from_driver_info(TALLOC_CTX *mem_ctx,
|
|||||||
const char *arch,
|
const char *arch,
|
||||||
int version)
|
int version)
|
||||||
{
|
{
|
||||||
int i, num_strings = 0;
|
int i;
|
||||||
|
size_t num_strings = 0;
|
||||||
const char **array = NULL;
|
const char **array = NULL;
|
||||||
|
|
||||||
if (string_array == NULL) {
|
if (string_array == NULL) {
|
||||||
|
@ -1659,7 +1659,7 @@ static bool init_drv_info_3_members(TALLOC_CTX *mem_ctx, struct spoolss_AddDrive
|
|||||||
char *args)
|
char *args)
|
||||||
{
|
{
|
||||||
char *str, *str2;
|
char *str, *str2;
|
||||||
int count = 0;
|
size_t count = 0;
|
||||||
char *saveptr = NULL;
|
char *saveptr = NULL;
|
||||||
struct spoolss_StringArray *deps;
|
struct spoolss_StringArray *deps;
|
||||||
const char **file_array = NULL;
|
const char **file_array = NULL;
|
||||||
@ -2636,7 +2636,8 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
|
|||||||
data.binary = strhex_to_data_blob(mem_ctx, argv[4]);
|
data.binary = strhex_to_data_blob(mem_ctx, argv[4]);
|
||||||
break;
|
break;
|
||||||
case REG_MULTI_SZ: {
|
case REG_MULTI_SZ: {
|
||||||
int i, num_strings;
|
int i;
|
||||||
|
size_t num_strings;
|
||||||
const char **strings = NULL;
|
const char **strings = NULL;
|
||||||
|
|
||||||
num_strings = 0;
|
num_strings = 0;
|
||||||
|
@ -1631,7 +1631,7 @@ static bool find_new_dc(TALLOC_CTX *mem_ctx,
|
|||||||
int num_dcs = 0;
|
int num_dcs = 0;
|
||||||
|
|
||||||
const char **dcnames = NULL;
|
const char **dcnames = NULL;
|
||||||
int num_dcnames = 0;
|
size_t num_dcnames = 0;
|
||||||
|
|
||||||
struct sockaddr_storage *addrs = NULL;
|
struct sockaddr_storage *addrs = NULL;
|
||||||
int num_addrs = 0;
|
int num_addrs = 0;
|
||||||
|
@ -2634,7 +2634,7 @@ static bool rap_get_servername(struct torture_context *tctx,
|
|||||||
static bool find_printers(struct torture_context *tctx,
|
static bool find_printers(struct torture_context *tctx,
|
||||||
struct dcerpc_pipe *p,
|
struct dcerpc_pipe *p,
|
||||||
const char ***printers,
|
const char ***printers,
|
||||||
int *num_printers)
|
size_t *num_printers)
|
||||||
{
|
{
|
||||||
struct srvsvc_NetShareEnum r;
|
struct srvsvc_NetShareEnum r;
|
||||||
struct srvsvc_NetShareInfoCtr info_ctr;
|
struct srvsvc_NetShareInfoCtr info_ctr;
|
||||||
@ -2771,7 +2771,7 @@ static bool torture_samba3_rpc_spoolss(struct torture_context *torture)
|
|||||||
struct dcerpc_binding_handle *b;
|
struct dcerpc_binding_handle *b;
|
||||||
struct policy_handle server_handle, printer_handle;
|
struct policy_handle server_handle, printer_handle;
|
||||||
const char **printers;
|
const char **printers;
|
||||||
int num_printers;
|
size_t num_printers;
|
||||||
struct spoolss_UserLevel1 userlevel1;
|
struct spoolss_UserLevel1 userlevel1;
|
||||||
char *servername;
|
char *servername;
|
||||||
|
|
||||||
|
@ -7258,7 +7258,7 @@ static bool test_GroupList(struct dcerpc_binding_handle *b,
|
|||||||
uint32_t returned_size;
|
uint32_t returned_size;
|
||||||
union samr_DispInfo info;
|
union samr_DispInfo info;
|
||||||
|
|
||||||
int num_names = 0;
|
size_t num_names = 0;
|
||||||
const char **names = NULL;
|
const char **names = NULL;
|
||||||
|
|
||||||
bool builtin_domain = dom_sid_compare(domain_sid,
|
bool builtin_domain = dom_sid_compare(domain_sid,
|
||||||
|
@ -530,7 +530,7 @@ static bool test_NetrEnumerateComputerNames_level(struct torture_context *tctx,
|
|||||||
struct dcerpc_pipe *p,
|
struct dcerpc_pipe *p,
|
||||||
uint16_t level,
|
uint16_t level,
|
||||||
const char ***names,
|
const char ***names,
|
||||||
int *num_names)
|
size_t *num_names)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct wkssvc_NetrEnumerateComputerNames r;
|
struct wkssvc_NetrEnumerateComputerNames r;
|
||||||
@ -666,7 +666,7 @@ static bool test_NetrAddAlternateComputerName(struct torture_context *tctx,
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct wkssvc_NetrAddAlternateComputerName r;
|
struct wkssvc_NetrAddAlternateComputerName r;
|
||||||
const char **names = NULL;
|
const char **names = NULL;
|
||||||
int num_names = 0;
|
size_t num_names = 0;
|
||||||
int i;
|
int i;
|
||||||
struct dcerpc_binding_handle *b = p->binding_handle;
|
struct dcerpc_binding_handle *b = p->binding_handle;
|
||||||
|
|
||||||
@ -708,7 +708,7 @@ static bool test_NetrRemoveAlternateComputerName(struct torture_context *tctx,
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct wkssvc_NetrRemoveAlternateComputerName r;
|
struct wkssvc_NetrRemoveAlternateComputerName r;
|
||||||
const char **names = NULL;
|
const char **names = NULL;
|
||||||
int num_names = 0;
|
size_t num_names = 0;
|
||||||
int i;
|
int i;
|
||||||
struct dcerpc_binding_handle *b = p->binding_handle;
|
struct dcerpc_binding_handle *b = p->binding_handle;
|
||||||
|
|
||||||
@ -781,7 +781,7 @@ static bool test_NetrSetPrimaryComputername(struct torture_context *tctx,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const char **names_o = NULL, **names = NULL;
|
const char **names_o = NULL, **names = NULL;
|
||||||
int num_names_o = 0, num_names = 0;
|
size_t num_names_o = 0, num_names = 0;
|
||||||
|
|
||||||
torture_comment(tctx, "Testing NetrSetPrimaryComputername\n");
|
torture_comment(tctx, "Testing NetrSetPrimaryComputername\n");
|
||||||
|
|
||||||
@ -887,7 +887,7 @@ static bool test_NetrRenameMachineInDomain2(struct torture_context *tctx,
|
|||||||
struct dcerpc_pipe *p)
|
struct dcerpc_pipe *p)
|
||||||
{
|
{
|
||||||
const char **names_o = NULL, **names = NULL;
|
const char **names_o = NULL, **names = NULL;
|
||||||
int num_names_o = 0, num_names = 0;
|
size_t num_names_o = 0, num_names = 0;
|
||||||
|
|
||||||
torture_comment(tctx, "Testing NetrRenameMachineInDomain2\n");
|
torture_comment(tctx, "Testing NetrRenameMachineInDomain2\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user