summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-01 07:25:53 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-01 07:25:53 +0000
commit3b2244526c7ae64f744539154681b9883daebc3f (patch)
treee97ff5a3fa541746a605d1f58862c65d16e999f5 /source3
parent21554bfae25d556562b24bdc5966fa517602561a (diff)
downloadsamba-3b2244526c7ae64f744539154681b9883daebc3f.tar.gz
samba-3b2244526c7ae64f744539154681b9883daebc3f.tar.bz2
samba-3b2244526c7ae64f744539154681b9883daebc3f.zip
Merge of signed/unsigned fixes from HEAD.
(This used to be commit e9f56a157bd472914eebf64fde586104d8274717)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/lib/bitmap.c2
-rw-r--r--source3/lib/charcnv.c4
-rw-r--r--source3/passdb/secrets.c4
-rw-r--r--source3/smbd/conn.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8138555539..279b79eace 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -807,7 +807,7 @@ struct parm_struct
struct bitmap {
uint32 *b;
- int n;
+ unsigned int n;
};
#define FLAG_BASIC 0x0001 /* fundamental options */
diff --git a/source3/lib/bitmap.c b/source3/lib/bitmap.c
index 26d21d085f..1023dd6541 100644
--- a/source3/lib/bitmap.c
+++ b/source3/lib/bitmap.c
@@ -129,7 +129,7 @@ wraparound
****************************************************************************/
int bitmap_find(struct bitmap *bm, unsigned ofs)
{
- int i, j;
+ unsigned int i, j;
if (ofs > bm->n) ofs = 0;
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 3428377d95..6dd3cd52d9 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -139,7 +139,7 @@ size_t convert_string(charset_t from, charset_t to,
i_len=srclen;
o_len=destlen;
retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len);
- if(retval==-1) {
+ if(retval==(size_t)-1) {
const char *reason="unknown error";
switch(errno) {
case EINVAL:
@@ -214,7 +214,7 @@ convert:
retval = smb_iconv(descriptor,
&inbuf, &i_len,
&outbuf, &o_len);
- if(retval == -1) {
+ if(retval == (size_t)-1) {
const char *reason="unknown error";
switch(errno) {
case EINVAL:
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index a52e264270..a58ea492ea 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -468,12 +468,12 @@ BOOL secrets_store_ldap_pw(const char* dn, char* pw)
* @return nt status code of rpc response
**/
-NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num_domains, int *num_domains, TRUSTDOM ***domains)
+NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, unsigned int max_num_domains, int *num_domains, TRUSTDOM ***domains)
{
TDB_LIST_NODE *keys, *k;
TRUSTDOM *dom = NULL;
char *pattern;
- int start_idx;
+ unsigned int start_idx;
uint32 idx = 0;
size_t size;
fstring dom_name;
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index c771f1254b..38fa2e0237 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -68,7 +68,7 @@ BOOL conn_snum_used(int snum)
/****************************************************************************
find a conn given a cnum
****************************************************************************/
-connection_struct *conn_find(int cnum)
+connection_struct *conn_find(unsigned cnum)
{
int count=0;
connection_struct *conn;
@@ -174,7 +174,7 @@ clear a vuid out of the validity cache, and as the 'owner' of a connection.
void conn_clear_vuid_cache(uint16 vuid)
{
connection_struct *conn;
- int i;
+ unsigned int i;
for (conn=Connections;conn;conn=conn->next) {
if (conn->vuid == vuid) {