Merge of signed/unsigned fixes from HEAD.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 1 Feb 2003 07:25:53 +0000 (07:25 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 1 Feb 2003 07:25:53 +0000 (07:25 +0000)
(This used to be commit e9f56a157bd472914eebf64fde586104d8274717)

source3/include/smb.h
source3/lib/bitmap.c
source3/lib/charcnv.c
source3/passdb/secrets.c
source3/smbd/conn.c

index 8138555539a3315082081988b180b87b2b53b3cb..279b79eace3f9c466222b6e94032550f03610b7d 100644 (file)
@@ -807,7 +807,7 @@ struct parm_struct
 
 struct bitmap {
        uint32 *b;
-       int n;
+       unsigned int n;
 };
 
 #define FLAG_BASIC     0x0001 /* fundamental options */
index 26d21d085f685111ed804cc6c3deb6852f4b8139..1023dd6541d8ea0f0a7be70d4c1dfce9e17e0474 100644 (file)
@@ -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;
 
index 3428377d952a8de9fc151c9d2f234b3a2e9faad5..6dd3cd52d97c836debb96ece290996719e85ca36 100644 (file)
@@ -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:
index a52e2642705a1a6fe70193a1881335219717c0b7..a58ea492eacbaa3dceda98da439877307f3cfdb8 100644 (file)
@@ -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;
index c771f1254b8123e228377d219c1dfbe441a60a56..38fa2e023769d9db2fbc0c6a01576bee8d86cc43 100644 (file)
@@ -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) {