summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-15 07:45:51 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-15 07:45:51 +0000
commita27d434c4b4363762e7a0d5eeddd35e2b8dbb374 (patch)
treecf83b7931f7ba94d10ba73cd3d76da39b1f6ca2b /source3/rpc_parse
parentd8549b0360b86f151a8cd221838d005e083bfba8 (diff)
downloadsamba-a27d434c4b4363762e7a0d5eeddd35e2b8dbb374.tar.gz
samba-a27d434c4b4363762e7a0d5eeddd35e2b8dbb374.tar.bz2
samba-a27d434c4b4363762e7a0d5eeddd35e2b8dbb374.zip
Fix signed/unsigned issues - mostly 'i' counters.
Fix an inconpatible poitner type that caused the IA64 not to build Andrew Bartlett (This used to be commit 37436b0aae108fceace3049d3868510e1ba592ac)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_lsa.c14
-rw-r--r--source3/rpc_parse/parse_misc.c10
-rw-r--r--source3/rpc_parse/parse_net.c22
-rw-r--r--source3/rpc_parse/parse_prs.c4
-rw-r--r--source3/rpc_parse/parse_sec.c16
-rw-r--r--source3/rpc_parse/parse_srv.c20
6 files changed, 43 insertions, 43 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 2753ae524a..fc9999dc4d 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -80,7 +80,7 @@ static BOOL lsa_io_trans_name(const char *desc, LSA_TRANS_NAME *trn, prs_struct
static BOOL lsa_io_dom_r_ref(const char *desc, DOM_R_REF *r_r, prs_struct *ps,
int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "lsa_io_dom_r_ref");
depth++;
@@ -531,7 +531,7 @@ BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context,
uint32 req_num_domains, uint32 num_domains, TRUSTDOM **td)
{
- int i;
+ unsigned int i;
DEBUG(5, ("init_r_enum_trust_dom\n"));
@@ -851,7 +851,7 @@ static void init_lsa_sid_enum(TALLOC_CTX *mem_ctx, LSA_SID_ENUM *sen,
static BOOL lsa_io_sid_enum(const char *desc, LSA_SID_ENUM *sen, prs_struct *ps,
int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "lsa_io_sid_enum");
depth++;
@@ -967,7 +967,7 @@ BOOL lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *
static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn,
prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "lsa_io_trans_names");
depth++;
@@ -1063,7 +1063,7 @@ makes a structure.
void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l,
POLICY_HND *hnd, int num_names, const char **names)
{
- int i;
+ unsigned int i;
DEBUG(5, ("init_q_lookup_names\n"));
@@ -1102,7 +1102,7 @@ reads or writes a structure.
BOOL lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r,
prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "lsa_io_q_lookup_names");
depth++;
@@ -1166,7 +1166,7 @@ reads or writes a structure.
BOOL lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *r_r,
prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "lsa_io_r_lookup_names");
depth++;
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index df80c76ee5..b7b0e9346b 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -697,7 +697,7 @@ BOOL smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
Inits a BUFFER2 structure.
********************************************************************/
-void init_buffer2(BUFFER2 *str, const uint8 *buf, int len)
+void init_buffer2(BUFFER2 *str, const uint8 *buf, size_t len)
{
ZERO_STRUCTP(str);
@@ -1050,7 +1050,7 @@ BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *
BOOL init_unistr2_array(UNISTR2_ARRAY *array,
uint32 count, const char **strings)
{
- int i;
+ unsigned int i;
array->count = count;
array->ref_id = count?1:0;
@@ -1078,7 +1078,7 @@ BOOL init_unistr2_array(UNISTR2_ARRAY *array,
********************************************************************/
BOOL smb_io_unistr2_array(const char *desc, UNISTR2_ARRAY *array, prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "smb_io_unistr2_array");
depth++;
@@ -1128,7 +1128,7 @@ BOOL smb_io_unistr2_array(const char *desc, UNISTR2_ARRAY *array, prs_struct *ps
BOOL init_sid_array(SID_ARRAY *array,
uint32 count, DOM_SID *sids)
{
- int i;
+ unsigned int i;
array->count = count;
array->ref_id = count?1:0;
@@ -1155,7 +1155,7 @@ BOOL init_sid_array(SID_ARRAY *array,
********************************************************************/
BOOL smb_io_sid_array(const char *desc, SID_ARRAY *array, prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "smb_io_sid_array");
depth++;
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 53f660fcc3..a660084250 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -432,7 +432,7 @@ BOOL net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps
void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t,
uint32 num_doms, const char *dom_name)
{
- int i = 0;
+ unsigned int i = 0;
DEBUG(5,("init_r_trust_dom\n"));
@@ -1038,12 +1038,12 @@ void init_id_info2(NET_ID_INFO_2 * id, const char *domain_name,
uint32 log_id_low, uint32 log_id_high,
const char *user_name, const char *wksta_name,
const uchar lm_challenge[8],
- const uchar * lm_chal_resp, int lm_chal_resp_len,
- const uchar * nt_chal_resp, int nt_chal_resp_len)
+ const uchar * lm_chal_resp, size_t lm_chal_resp_len,
+ const uchar * nt_chal_resp, size_t nt_chal_resp_len)
{
- int len_domain_name = strlen(domain_name);
- int len_user_name = strlen(user_name );
- int len_wksta_name = strlen(wksta_name );
+ size_t len_domain_name = strlen(domain_name);
+ size_t len_user_name = strlen(user_name );
+ size_t len_wksta_name = strlen(wksta_name );
unsigned char lm_owf[24];
unsigned char nt_owf[128];
@@ -1281,7 +1281,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
{
/* only cope with one "other" sid, right now. */
/* need to count the number of space-delimited sids */
- int i;
+ unsigned int i;
int num_other_sids = 0;
NTTIME logon_time, logoff_time, kickoff_time,
@@ -1390,7 +1390,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
int depth, uint16 validation_level)
{
- int i;
+ unsigned int i;
if (usr == NULL)
return False;
@@ -2363,7 +2363,7 @@ reads or writes a structure.
static BOOL net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info,
prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "net_io_sam_policy_info");
depth++;
@@ -2584,7 +2584,7 @@ reads or writes a structure.
static BOOL net_io_sam_privs_info(const char *desc, SAM_DELTA_PRIVS *info,
prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "net_io_sam_privs_info");
depth++;
@@ -2895,7 +2895,7 @@ reads or writes a structure.
BOOL net_io_r_sam_deltas(const char *desc, uint8 sess_key[16],
NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
prs_debug(ps, depth, desc, "net_io_r_sam_deltas");
depth++;
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 702375be35..aeaa42ac92 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -938,7 +938,7 @@ BOOL prs_buffer2(BOOL charmode, const char *name, prs_struct *ps, int depth, BUF
BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str)
{
- int i;
+ unsigned int i;
char *q = prs_mem_get(ps, str->str_max_len);
if (q == NULL)
return False;
@@ -1035,7 +1035,7 @@ BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps,
BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str)
{
- int len = 0;
+ unsigned int len = 0;
unsigned char *p = (unsigned char *)str->buffer;
uint8 *start;
char *q;
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index 10b0ff86ae..081173cf8d 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -159,7 +159,7 @@ BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask)
{
- int i = 0;
+ unsigned int i = 0;
if (!ctx || !new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER;
@@ -185,7 +185,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned
NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask)
{
- int i = 0;
+ unsigned int i = 0;
if (!ace || !sid) return NT_STATUS_INVALID_PARAMETER;
@@ -202,14 +202,14 @@ NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask)
delete SID from ACL
********************************************************************/
-NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, size_t *num, DOM_SID *sid)
+static NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, uint32 *num, DOM_SID *sid)
{
- int i = 0;
- int n_del = 0;
+ unsigned int i = 0;
+ unsigned int n_del = 0;
if (!ctx || !new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER;
- if((new[0] = (SEC_ACE *) talloc_zero(ctx, *num * sizeof(SEC_ACE))) == 0)
+ if((new[0] = (SEC_ACE *) talloc_zero(ctx, (*num) * sizeof(SEC_ACE))) == 0)
return NT_STATUS_NO_MEMORY;
for (i = 0; i < *num; i ++) {
@@ -283,7 +283,7 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src)
BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
uint32 old_offset;
uint32 offset_acl_size;
SEC_ACL *psa;
@@ -407,7 +407,7 @@ BOOL sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2)
BOOL sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2)
{
- int i, j;
+ unsigned int i, j;
/* Trivial cases */
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index bfa1a13be9..27763aa224 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -1665,8 +1665,8 @@ static BOOL srv_io_srv_sess_info_0(const char *desc, SRV_SESS_INFO_0 *ss0, prs_s
return False;
if (ss0->ptr_sess_info != 0) {
- int i;
- int num_entries = ss0->num_entries_read;
+ uint32 i;
+ uint32 num_entries = ss0->num_entries_read;
if (num_entries > MAX_SESS_ENTRIES) {
num_entries = MAX_SESS_ENTRIES; /* report this! */
@@ -1802,8 +1802,8 @@ static BOOL srv_io_srv_sess_info_1(const char *desc, SRV_SESS_INFO_1 *ss1, prs_s
return False;
if (ss1->ptr_sess_info != 0) {
- int i;
- int num_entries = ss1->num_entries_read;
+ uint32 i;
+ uint32 num_entries = ss1->num_entries_read;
if (num_entries > MAX_SESS_ENTRIES) {
num_entries = MAX_SESS_ENTRIES; /* report this! */
@@ -1944,7 +1944,7 @@ BOOL srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_stru
if(!prs_uint32("sess_level", ps, depth, &q_n->sess_level))
return False;
- if (q_n->sess_level != -1) {
+ if (q_n->sess_level != (uint32)-1) {
if(!srv_io_srv_sess_ctr("sess_ctr", &q_n->ctr, ps, depth))
return False;
}
@@ -1976,7 +1976,7 @@ BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_stru
if(!prs_uint32("sess_level", ps, depth, &r_n->sess_level))
return False;
- if (r_n->sess_level != -1) {
+ if (r_n->sess_level != (uint32)-1) {
if(!srv_io_srv_sess_ctr("sess_ctr", &r_n->ctr, ps, depth))
return False;
}
@@ -2309,7 +2309,7 @@ BOOL srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_stru
if(!prs_uint32("conn_level", ps, depth, &q_n->conn_level))
return False;
- if (q_n->conn_level != -1) {
+ if (q_n->conn_level != (uint32)-1) {
if(!srv_io_srv_conn_ctr("conn_ctr", &q_n->ctr, ps, depth))
return False;
}
@@ -2341,7 +2341,7 @@ BOOL srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_str
if(!prs_uint32("conn_level", ps, depth, &r_n->conn_level))
return False;
- if (r_n->conn_level != -1) {
+ if (r_n->conn_level != (uint32)-1) {
if(!srv_io_srv_conn_ctr("conn_ctr", &r_n->ctr, ps, depth))
return False;
}
@@ -2573,7 +2573,7 @@ BOOL srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_stru
if(!prs_uint32("file_level", ps, depth, &q_n->file_level))
return False;
- if (q_n->file_level != -1) {
+ if (q_n->file_level != (uint32)-1) {
if(!srv_io_srv_file_ctr("file_ctr", &q_n->ctr, ps, depth))
return False;
}
@@ -3271,7 +3271,7 @@ BOOL srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_stru
BOOL srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth)
{
- int i;
+ unsigned int i;
uint32 entries_read, entries_read2, entries_read3;
if (r_n == NULL)