r960: convert 'unsigned int' to uint_t in the most places
authorStefan Metzmacher <metze@samba.org>
Tue, 1 Jun 2004 08:12:45 +0000 (08:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:23 +0000 (12:56 -0500)
metze
(This used to be commit 18062d2ed9fc9224c43143c10efbf2f6f1f5bbe0)

35 files changed:
source4/client/client.c
source4/client/smbmnt.c
source4/include/cli_context.h
source4/include/nameserv.h
source4/include/registry.h
source4/include/smb.h
source4/lib/bitmap.c
source4/lib/crypto/md5.c
source4/lib/messages.c
source4/lib/pidfile.c
source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c
source4/lib/registry/reg_backend_w95/reg_backend_w95.c
source4/lib/system.c
source4/lib/tdb/common/spinlock.c
source4/lib/tdb/common/tdbutil.c
source4/lib/tdb/include/spinlock.h
source4/lib/util.c
source4/lib/util_str.c
source4/libads/kerberos_verify.c
source4/libads/krb5_setpw.c
source4/libcli/auth/ntlmssp.h
source4/libcli/clifile.c
source4/libcli/namequery.c
source4/libcli/nmblib.c
source4/libcli/util/dom_sid.c
source4/libcli/util/smbdes.c
source4/librpc/ndr/ndr_sec.c
source4/passdb/secrets.c
source4/scripting/swig/tdb.i
source4/smb_server/conn.c
source4/smb_server/connection.c
source4/smb_server/password.c
source4/torture/torture.c
source4/utils/net_rap.c
source4/utils/nmblookup.c

index 1f813a3d180781b3370369f1b49e2cab776ad2b3..1d428a4f0e067a018a231f27de62c1ebc1fe2c87 100644 (file)
@@ -84,9 +84,9 @@ static pstring fileselection = "";
 
 /* timing globals */
 uint64_t get_total_size = 0;
-unsigned int get_total_time_ms = 0;
+uint_t get_total_time_ms = 0;
 static uint64_t put_total_size = 0;
-static unsigned int put_total_time_ms = 0;
+static uint_t put_total_time_ms = 0;
 
 /* totals globals */
 static double dir_total;
@@ -1926,7 +1926,7 @@ static int cmd_chmod(void)
 
        if (NT_STATUS_IS_ERR(cli_unix_chmod(cli->tree, src, mode))) {
                d_printf("%s chmod file %s 0%o\n",
-                       cli_errstr(cli->tree), src, (unsigned int)mode);
+                       cli_errstr(cli->tree), src, (uint_t)mode);
                return 1;
        } 
 
index ce406179cfdd9d71f2e56f0a49f4e9616a52d17c..5c0d7ea1b3251352c9adf59d133f5bc6344b7ecc 100644 (file)
@@ -139,7 +139,7 @@ static int mount_ok(char *mount_point)
 /* Tries to mount using the appropriate format. For 2.2 the struct,
    for 2.4 the ascii version. */
 static int
-do_mount(char *share_name, unsigned int flags, struct smb_mount_data *data)
+do_mount(char *share_name, uint_t flags, struct smb_mount_data *data)
 {
        pstring opts;
        struct utsname uts;
@@ -173,7 +173,7 @@ do_mount(char *share_name, unsigned int flags, struct smb_mount_data *data)
        char *mount_point, *share_name = NULL;
        FILE *mtab;
        int fd;
-       unsigned int flags;
+       uint_t flags;
        struct smb_mount_data data;
        struct mntent ment;
 
index 4cfdc8db91e5e159152f740efbd8882c2d994047..b0e178e1d0a6347517f9270c3f968bc32d9ce1a2 100644 (file)
@@ -62,8 +62,8 @@ struct cli_negotiate {
        
        int server_zone;
        time_t server_time;
-       unsigned int readbraw_supported:1;
-       unsigned int writebraw_supported:1;
+       uint_t readbraw_supported:1;
+       uint_t writebraw_supported:1;
 
        const char *server_domain;
 };
@@ -99,9 +99,9 @@ struct cli_socket {
   client library
 */
 struct cli_options {
-       unsigned int use_oplocks:1;
-       unsigned int use_level2_oplocks:1;
-       unsigned int use_spnego:1;
+       uint_t use_oplocks:1;
+       uint_t use_level2_oplocks:1;
+       uint_t use_spnego:1;
 };
 
 /* this is the context for the client transport layer */
@@ -126,7 +126,7 @@ struct cli_transport {
 
        /* is a readbraw pending? we need to handle that case
           specially on receiving packets */
-       unsigned int readbraw_pending:1;
+       uint_t readbraw_pending:1;
        
        /* an idle function - if this is defined then it will be
           called once every period milliseconds while we are waiting
@@ -236,7 +236,7 @@ struct cli_request {
 
        /* set if this is a one-way request, meaning we are not
           expecting a reply from the server. */
-       unsigned int one_way_request:1;
+       uint_t one_way_request:1;
 
        /* the mid of this packet - used to match replies */
        uint16_t mid;
index 8b0fa835b9d116ce3458b5bf37c34e00ad740b18..2fe3fae9dedda388a797fcc18ecaa444f9e8c6b7 100644 (file)
@@ -311,7 +311,7 @@ typedef void (*userdata_free_fn)(struct userdata_struct *);
 struct userdata_struct {
   userdata_copy_fn copy_fn;
   userdata_free_fn free_fn;
-  unsigned int userdata_len;
+  uint_t userdata_len;
   char data[16]; /* 16 is to ensure alignment/padding on all systems */
 };
 
index 478c7919ede336a6a1a6bd8be9fe57d9207da33b..db1dee9b9640bfb47c27a909c1412c431ca9a1bd 100644 (file)
@@ -52,7 +52,7 @@ typedef struct reg_ops_s REG_OPS;
 //FIXME
 typedef struct ace_struct_s {
   uint8_t type, flags;
-  unsigned int perms;   /* Perhaps a better def is in order */
+  uint_t perms;   /* Perhaps a better def is in order */
   DOM_SID *trustee;
 } ACE;
 #endif
index 178fab1db1035499bf45d31681d41a524e60c2a7..55dd430d0500562baa21a563e04f92310ec973e9 100644 (file)
@@ -383,7 +383,7 @@ struct parm_struct
 
 struct bitmap {
        uint32_t *b;
-       unsigned int n;
+       uint_t n;
 };
 
 #define FLAG_BASIC     0x0001 /* fundamental options */
@@ -855,7 +855,7 @@ struct bitmap {
 struct nmb_name {
        char         name[17];
        char         scope[64];
-       unsigned int name_type;
+       uint_t name_type;
 };
 
 
index 63b093617bf7a8a35456574ab3c1d6aac09b0632..2e67fb5439eb90ea34d51a157c26bf948ab6f38c 100644 (file)
@@ -129,7 +129,7 @@ wraparound
 ****************************************************************************/
 int bitmap_find(struct bitmap *bm, unsigned ofs)
 {
-       unsigned int i, j;
+       uint_t i, j;
 
        if (ofs > bm->n) ofs = 0;
 
index a393fc253287e49b5180549911e667bf0899656f..1c53a0a1527e19b5fba89bc473ccbdcc67ce9cd6 100644 (file)
@@ -107,7 +107,7 @@ void MD5Update(struct MD5Context *ctx, uint8_t const *buf, unsigned len)
  */
 void MD5Final(uint8_t digest[16], struct MD5Context *ctx)
 {
-    unsigned int count;
+    uint_t count;
     uint8_t *p;
 
     /* Compute number of bytes mod 64 */
index 9357b12f1fbc0f1f446529cf2b37f6a34f260544..b4de7c0145f6e99e80c6a9ea3fe812f6b9a85a5a 100644 (file)
@@ -86,7 +86,7 @@ static void sig_usr1(void)
 static void ping_message(int msg_type, pid_t src, void *buf, size_t len)
 {
        const char *msg = buf ? buf : "none";
-       DEBUG(1,("INFO: Received PING message from PID %u [%s]\n",(unsigned int)src, msg));
+       DEBUG(1,("INFO: Received PING message from PID %u [%s]\n",(uint_t)src, msg));
        message_send_pid(src, MSG_PONG, buf, len, True);
 }
 
@@ -169,7 +169,7 @@ static BOOL message_notify(pid_t pid)
 ****************************************************************************/
 
 static BOOL message_send_pid_internal(pid_t pid, int msg_type, const void *buf, size_t len,
-                     BOOL duplicates_allowed, unsigned int timeout)
+                     BOOL duplicates_allowed, uint_t timeout)
 {
        TDB_DATA kbuf;
        TDB_DATA dbuf;
@@ -301,7 +301,7 @@ BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len, BOOL
 ****************************************************************************/
 
 BOOL message_send_pid_with_timeout(pid_t pid, int msg_type, const void *buf, size_t len,
-               BOOL duplicates_allowed, unsigned int timeout)
+               BOOL duplicates_allowed, uint_t timeout)
 {
        return message_send_pid_internal(pid, msg_type, buf, len, duplicates_allowed, timeout);
 }
@@ -409,7 +409,7 @@ void message_dispatch(void)
 
        for (buf = msgs_buf; message_recv(msgs_buf, total_len, &msg_type, &src, &buf, &len); buf += len) {
                DEBUG(10,("message_dispatch: received msg_type=%d src_pid=%u\n",
-                         msg_type, (unsigned int) src));
+                         msg_type, (uint_t) src));
                n_handled = 0;
                for (dfn = dispatch_fns; dfn; dfn = dfn->next) {
                        if (dfn->msg_type == msg_type) {
@@ -421,7 +421,7 @@ void message_dispatch(void)
                if (!n_handled) {
                        DEBUG(5,("message_dispatch: warning: no handlers registed for "
                                 "msg_type %d in pid %u\n",
-                                msg_type, (unsigned int)getpid()));
+                                msg_type, (uint_t)getpid()));
                }
        }
        SAFE_FREE(msgs_buf);
@@ -514,7 +514,7 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void
 
                if (errno == ESRCH) {
                        DEBUG(2,("pid %u doesn't exist - deleting connections %d [%s]\n",
-                                       (unsigned int)crec.pid, crec.cnum, crec.name));
+                                       (uint_t)crec.pid, crec.cnum, crec.name));
                        tdb_delete(the_tdb, kbuf);
                }
        }
index 3471f27b8edd3ea7c8f3f8cc14ced0826406dc25..7126482256add0d351ac7e2185174ba6857173df 100644 (file)
@@ -99,7 +99,7 @@ void pidfile_create(const char *name)
        }
 
        memset(buf, 0, sizeof(buf));
-       slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) getpid());
+       slprintf(buf, sizeof(buf) - 1, "%u\n", (uint_t) getpid());
        if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
                DEBUG(0,("ERROR: can't write to file %s: %s\n", 
                         pidFile, strerror(errno)));
index fa4b3e4d188d527bffdbc1e6e2d66051d0b001c6..36feaff907e9d064aeca201d702e19ac413f5c03 100644 (file)
@@ -338,7 +338,7 @@ const char *def_owner_sid_str = NULL;
 
 #define BLK_SIZE(b) ((int)*(int *)(((int *)b)-1))
 
-typedef unsigned int DWORD;
+typedef uint_t DWORD;
 typedef unsigned short WORD;
 
 typedef struct sk_struct SK_HDR;
@@ -358,7 +358,7 @@ typedef struct regf_block {
        DWORD uk5;             /* 0 */
        DWORD uk6;             /* 1 */
        DWORD first_key;       /* offset */
-       unsigned int dblk_size;
+       uint_t dblk_size;
     DWORD uk7[116];        /* 1 */
     DWORD chksum;
 } REGF_HDR;
@@ -462,9 +462,9 @@ typedef struct hbin_blk_s {
   int type, size;
   struct hbin_blk_s *next;
   char *data;                /* The data block                */
-  unsigned int file_offset;  /* Offset in file                */
-  unsigned int free_space;   /* Amount of free space in block */
-  unsigned int fsp_off;      /* Start of free space in block  */
+  uint_t file_offset;  /* Offset in file                */
+  uint_t free_space;   /* Amount of free space in block */
+  uint_t fsp_off;      /* Start of free space in block  */
   int complete, stored;
 } HBIN_BLK;
 
@@ -1023,7 +1023,7 @@ static WERROR nk_to_key(REG_HANDLE *h, NK_HDR *nk_hdr, int size, REG_KEY *parent
        REGF *regf = h->backend_data;
        REG_KEY *tmp = NULL, *own;
        int namlen, clsname_len, sk_off, own_off;
-       unsigned int nk_id;
+       uint_t nk_id;
        SK_HDR *sk_hdr;
        int type;
        char key_name[1024], cls_name[1024];
@@ -1104,7 +1104,7 @@ static WERROR nk_to_key(REG_HANDLE *h, NK_HDR *nk_hdr, int size, REG_KEY *parent
        DEBUG(2, ("Owner Offset: %0X\n", own_off));
 
        DEBUGADD(2, ("  Owner locn: %0X, Our locn: %0X\n", 
-                                (unsigned int)own, (unsigned int)nk_hdr));
+                                (uint_t)own, (uint_t)nk_hdr));
 
        /* 
         * We should verify that the owner field is correct ...
@@ -1185,7 +1185,7 @@ static HBIN_BLK *nt_create_hbin_blk(REG_HANDLE *h, int size)
  * Allocate a unit of space ... and return a pointer as function param
  * and the block's offset as a side effect
  */
-static void *nt_alloc_regf_space(REG_HANDLE *h, int size, unsigned int *off)
+static void *nt_alloc_regf_space(REG_HANDLE *h, int size, uint_t *off)
 {
        REGF *regf = h->backend_data;
        int tmp = 0;
@@ -1357,10 +1357,10 @@ static int nt_store_acl(REG_HANDLE *regf, SEC_ACL *acl, uint8_t *locn) {
  * that first, then the owner, then the group SID. So, we do it that way
  * too.
  */
-static unsigned int nt_store_sec_desc(REG_HANDLE *regf, SEC_DESC *sd, char *locn)
+static uint_t nt_store_sec_desc(REG_HANDLE *regf, SEC_DESC *sd, char *locn)
 {
        SEC_DESC *rsd = (SEC_DESC *)locn;
-       unsigned int size = 0, off = 0;
+       uint_t size = 0, off = 0;
 
        if (!regf || !sd || !locn) return 0;
 
@@ -1424,10 +1424,10 @@ static unsigned int nt_store_sec_desc(REG_HANDLE *regf, SEC_DESC *sd, char *locn
  * If it has already been stored, just get its offset from record
  * otherwise, store it and record its offset
  */
-static unsigned int nt_store_security(REG_HANDLE *regf, KEY_SEC_DESC *sec)
+static uint_t nt_store_security(REG_HANDLE *regf, KEY_SEC_DESC *sec)
 {
        int size = 0;
-       unsigned int sk_off;
+       uint_t sk_off;
        SK_HDR *sk_hdr;
 
        if (sec->offset) return sec->offset;
@@ -1483,7 +1483,7 @@ static unsigned int nt_store_security(REG_HANDLE *regf, KEY_SEC_DESC *sec)
 static int nt_store_reg_key(REG_HANDLE *regf, REG_KEY *key)
 {
        NK_HDR *nk_hdr; 
-       unsigned int nk_off, sk_off, size;
+       uint_t nk_off, sk_off, size;
 
        if (!regf || !key) return 0;
 
@@ -1581,7 +1581,7 @@ static WERROR nt_open_registry (REG_HANDLE *h, const char *location, const char
 {
        REGF *regf;
        REGF_HDR *regf_hdr;
-       unsigned int regf_id, hbin_id;
+       uint_t regf_id, hbin_id;
        HBIN_HDR *hbin_hdr;
 
        regf = (REGF *)talloc_p(h->mem_ctx, REGF);
index b014f4da663037e0883774b88605eaa8bc72483a..f392759b8de5e0e941a6f0fb6b07dbf1fdcc77f7 100644 (file)
@@ -40,7 +40,7 @@
  * the keys and the RGDB contains the actual data.
  */
 
-typedef unsigned int DWORD;
+typedef uint_t DWORD;
 typedef unsigned short WORD;
 
 typedef struct creg_block {
index 2641a180ef391ecc7025efdb1a52ee46f14a04cf..8d307caea3bd26d98e8f32cfae0bff66aa961164 100644 (file)
@@ -507,7 +507,7 @@ long sys_random(void)
  Wrapper for srandom().
 ****************************************************************************/
 
-void sys_srandom(unsigned int seed)
+void sys_srandom(uint_t seed)
 {
 #if defined(HAVE_SRANDOM)
        srandom(seed);
index 1b789d4daad20a7701c27a6c76fed83b2b9ceb58..0c8991c1e0e9b23a6172e987c94876a355d37de7 100644 (file)
@@ -55,7 +55,7 @@
 
 static inline int __spin_trylock(spinlock_t *lock)
 {
-       unsigned int result;
+       uint_t result;
 
        asm volatile("ldstub    [%1], %0"
                : "=r" (result)
@@ -85,7 +85,7 @@ static inline int __spin_is_locked(spinlock_t *lock)
 
 static inline int __spin_trylock(spinlock_t *lock)
 {
-       unsigned int result;
+       uint_t result;
 
        __asm__ __volatile__(
 "1:    lwarx           %0,0,%1\n\
@@ -167,7 +167,7 @@ static inline int __spin_is_locked(spinlock_t *lock)
 /* Returns 0 if the lock is acquired, EBUSY otherwise. */
 static inline int __spin_trylock(spinlock_t *lock)
 {
-        unsigned int val;
+        uint_t val;
         val = __lock_test_and_set(lock, 1);
         return val == 0 ? 0 : EBUSY;
 }
@@ -185,16 +185,16 @@ static inline void __spin_lock_init(spinlock_t *lock)
 /* Returns 1 if the lock is held, 0 otherwise. */
 static inline int __spin_is_locked(spinlock_t *lock)
 {
-        unsigned int val;
+        uint_t val;
         val = __add_and_fetch(lock, 0);
        return val;
 }
 
 #elif defined(MIPS_SPINLOCKS) 
 
-static inline unsigned int load_linked(unsigned long addr)
+static inline uint_t load_linked(unsigned long addr)
 {
-       unsigned int res;
+       uint_t res;
 
        __asm__ __volatile__("ll\t%0,(%1)"
                : "=r" (res)
@@ -203,9 +203,9 @@ static inline unsigned int load_linked(unsigned long addr)
        return res;
 }
 
-static inline unsigned int store_conditional(unsigned long addr, unsigned int value)
+static inline uint_t store_conditional(unsigned long addr, uint_t value)
 {
-       unsigned int res;
+       uint_t res;
 
        __asm__ __volatile__("sc\t%0,(%2)"
                : "=r" (res)
@@ -215,7 +215,7 @@ static inline unsigned int store_conditional(unsigned long addr, unsigned int va
 
 static inline int __spin_trylock(spinlock_t *lock)
 {
-       unsigned int mw;
+       uint_t mw;
 
        do {
                mw = load_linked(lock);
@@ -418,7 +418,7 @@ int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type)
        return 0;
 }
 
-int tdb_create_rwlocks(int fd, unsigned int hash_size)
+int tdb_create_rwlocks(int fd, uint_t hash_size)
 {
        unsigned size, i;
        tdb_rwlock_t *rwlocks;
@@ -460,7 +460,7 @@ int tdb_clear_spinlocks(TDB_CONTEXT *tdb)
        return 0;
 }
 #else
-int tdb_create_rwlocks(int fd, unsigned int hash_size) { return 0; }
+int tdb_create_rwlocks(int fd, uint_t hash_size) { return 0; }
 int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type) { return -1; }
 int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type) { return -1; }
 
index 05f4713c825becef08408d5df9f5f34da9354332..6b9ad414c5124ff098424a2cf8875033a2d6ef1f 100644 (file)
@@ -91,7 +91,7 @@ static TDB_DATA make_tdb_data(const char *dptr, size_t dsize)
  Lock a chain with timeout (in seconds).
 ****************************************************************************/
 
-static int tdb_chainlock_with_timeout_internal(TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout, int rw_type)
+static int tdb_chainlock_with_timeout_internal(TDB_CONTEXT *tdb, TDB_DATA key, uint_t timeout, int rw_type)
 {
        /* Allow tdb_chainlock to be interrupted by an alarm. */
        int ret;
@@ -129,7 +129,7 @@ static int tdb_chainlock_with_timeout_internal(TDB_CONTEXT *tdb, TDB_DATA key, u
  Write lock a chain. Return -1 if timeout or lock failed.
 ****************************************************************************/
 
-int tdb_chainlock_with_timeout(TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout)
+int tdb_chainlock_with_timeout(TDB_CONTEXT *tdb, TDB_DATA key, uint_t timeout)
 {
        return tdb_chainlock_with_timeout_internal(tdb, key, timeout, F_WRLCK);
 }
@@ -138,7 +138,7 @@ int tdb_chainlock_with_timeout(TDB_CONTEXT *tdb, TDB_DATA key, unsigned int time
  Lock a chain by string. Return -1 if timeout or lock failed.
 ****************************************************************************/
 
-int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout)
+int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, uint_t timeout)
 {
        TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
        
@@ -160,7 +160,7 @@ void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
  Read lock a chain by string. Return -1 if timeout or lock failed.
 ****************************************************************************/
 
-int tdb_read_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout)
+int tdb_read_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, uint_t timeout)
 {
        TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
        
index 967fe37457fb9a69b754c3ef50fc860d729a7963..1255d455de4f10311bc523a9252031a0b5aa25e7 100644 (file)
@@ -36,7 +36,7 @@ typedef struct {
 
 int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type);
 int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
-int tdb_create_rwlocks(int fd, unsigned int hash_size);
+int tdb_create_rwlocks(int fd, uint_t hash_size);
 int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
 
 #define TDB_SPINLOCK_SIZE(hash_size) (((hash_size) + 1) * sizeof(tdb_rwlock_t))
@@ -49,7 +49,7 @@ int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
 #else
 int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type);
 int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
-int tdb_create_rwlocks(int fd, unsigned int hash_size);
+int tdb_create_rwlocks(int fd, uint_t hash_size);
 #endif
 int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
 #define TDB_SPINLOCK_SIZE(hash_size) 0
index dd53d2b174dff4b8739eafccabc80e8ffeefbb68..2fc87241deee1e3864333e0e2e89f43abdd5843d 100644 (file)
@@ -189,7 +189,7 @@ int set_blocking(int fd, BOOL set)
  Sleep for a specified number of milliseconds.
 ********************************************************************/
 
-void msleep(unsigned int t)
+void msleep(uint_t t)
 {
        struct timeval tval;  
 
index 0113b1ae484a51475c5f1d20a878452d1f1621fd..7b1a81bdfd484d6f9194895a2c744ab657703741 100644 (file)
@@ -402,7 +402,7 @@ char *safe_strcpy(char *dest,const char *src, size_t maxlength)
 
        if (len > maxlength) {
                DEBUG(0,("ERROR: string overflow by %u (%u - %u) in safe_strcpy [%.50s]\n",
-                        (unsigned int)(len-maxlength), len, maxlength, src));
+                        (uint_t)(len-maxlength), len, maxlength, src));
                len = maxlength;
        }
       
index 8b319ee5544d6783d4bbcd1aabe8195f37b68262..48a8378d3664ef7820a954109c0c82f36c310c47 100644 (file)
@@ -313,14 +313,14 @@ NTSTATUS ads_verify_ticket(const char *realm, const DATA_BLOB *ticket,
 #endif
                                        keytab, NULL, &tkt))) {
                        DEBUG(10,("ads_verify_ticket: enc type [%u] decrypted message !\n",
-                               (unsigned int)enctypes[i] ));
+                               (uint_t)enctypes[i] ));
                        auth_ok = True;
                        break;
                }
        
                DEBUG((ret != KRB5_BAD_ENCTYPE) ? 3 : 10,
                                ("ads_verify_ticket: enc type [%u] failed to decrypt with error %s\n",
-                               (unsigned int)enctypes[i], error_message(ret)));
+                               (uint_t)enctypes[i], error_message(ret)));
        }
 
        release_server_mutex();
index 5a736d4dcdb4d8c9fd54d16478369dcf35a428a4..f6a5b9375c848768602f220e56791f101d2bdfdb 100644 (file)
@@ -199,7 +199,7 @@ static krb5_error_code setpw_result_code_string(krb5_context context,
                                                int result_code,
                                                const char **code_string)
 {
-        unsigned int idx = 0;
+        uint_t idx = 0;
 
        while (kpasswd_errors[idx].error_string != NULL) {
                if (kpasswd_errors[idx].result_code == 
index 968911fef5db0a605fa7a9aaf6305d4e26ce7bf0..aa7aa7e02b99b2f114e8a5f6ba0fca218b5b8b0c 100644 (file)
@@ -74,7 +74,7 @@ enum NTLM_MESSAGE_TYPE
 typedef struct ntlmssp_state 
 {
        TALLOC_CTX *mem_ctx;
-       unsigned int ref_count;
+       uint_t ref_count;
        enum NTLMSSP_ROLE role;
        enum samr_Role server_role;
        uint32_t expected_state;
index 23f3cdc4a450bd13d6559228e4222f02cc0ff6c6..7f4384a2224df7cd4c582c7bee5dcc69b50eb8ee 100644 (file)
@@ -53,7 +53,7 @@ static NTSTATUS cli_link_internal(struct cli_tree *tree,
 ****************************************************************************/
 static uint32_t unix_perms_to_wire(mode_t perms)
 {
-        unsigned int ret = 0;
+        uint_t ret = 0;
 
         ret |= ((perms & S_IXOTH) ?  UNIX_X_OTH : 0);
         ret |= ((perms & S_IWOTH) ?  UNIX_W_OTH : 0);
index a04e8831387849a37666aab075bc56f2f458ca4f..fc6a93d8e195b51f2507a97686d755febe23596b 100644 (file)
@@ -1121,8 +1121,8 @@ NT GETDC call, UNICODE, NT domain SID and uncle tom cobbley and all...
                        buf -= 4;
 
                        if (CVAL(buf,smb_com) != SMBtrans) {
-                               DEBUG(0,("lookup_pdc_name: datagram type %u != SMBtrans(%u)\n", (unsigned int)
-                                        CVAL(buf,smb_com), (unsigned int)SMBtrans ));
+                               DEBUG(0,("lookup_pdc_name: datagram type %u != SMBtrans(%u)\n", (uint_t)
+                                        CVAL(buf,smb_com), (uint_t)SMBtrans ));
                                free_packet(p_ret);
                                continue;
                        }
@@ -1142,7 +1142,7 @@ NT GETDC call, UNICODE, NT domain SID and uncle tom cobbley and all...
 
                        if(SVAL(buf2,0) != QUERYFORPDC_R) {
                                DEBUG(0,("lookup_pdc_name: datagram type (%u) != QUERYFORPDC_R(%u)\n",
-                                        (unsigned int)SVAL(buf,0), (unsigned int)QUERYFORPDC_R ));
+                                        (uint_t)SVAL(buf,0), (uint_t)QUERYFORPDC_R ));
                                free_packet(p_ret);
                                continue;
                        }
index 0fe9ee2453bf5d2e59e1c7d103579f7487de8c12..ef61686e57dbd64e15bbed1d165a2dd3b9b772b9 100644 (file)
@@ -812,7 +812,7 @@ void make_nmb_name( struct nmb_name *n, const char *name, int type)
 {
        memset( (char *)n, '\0', sizeof(struct nmb_name) );
        push_ascii(n->name, name, 16, STR_TERMINATE|STR_UPPER);
-       n->name_type = (unsigned int)type & 0xFF;
+       n->name_type = (uint_t)type & 0xFF;
        StrnCpy( n->scope, lp_netbios_scope(), 63 );
        strupper( n->scope );
 }
index 88ece25a8eb4483b0c2c141fd80e2b50ede6fe91..cdf89ccf9611ca350e4972244fa41107f5e63a6b 100644 (file)
@@ -28,7 +28,7 @@
 struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
 {
        struct dom_sid *ret;
-       unsigned int rev, ia, num_sub_auths, i;
+       uint_t rev, ia, num_sub_auths, i;
        char *p;
   
        if (strncasecmp(sidstr, "S-", 2)) {
index b0efdec1573c04aa8e2e1d8da89787475f39db34..b2e46e759d7d2cfdd03acca7812e4aeb551062e2 100644 (file)
@@ -412,7 +412,7 @@ void SamOEMhash(uint8_t *data, const uint8_t keystr[16], int len)
 /* Decode a sam password hash into a password.  The password hash is the
    same method used to store passwords in the NT registry.  The DES key
    used is based on the RID of the user. */
-void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw)
+void sam_pwd_hash(uint_t rid, const uchar *in, uchar *out, int forw)
 {
        uchar s[14];
 
index 0c3982f390267758cc58b0c5a76a4d2a561825b5..1fe8adbf4a1016339c87e241566645f0af84cf00 100644 (file)
@@ -73,7 +73,7 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
                (sid->id_auth[2] << 24);
 
        ofs = snprintf(ret, maxlen, "S-%u-%lu", 
-                      (unsigned int)sid->sid_rev_num, (unsigned long)ia);
+                      (uint_t)sid->sid_rev_num, (unsigned long)ia);
 
        for (i = 0; i < sid->num_auths; i++) {
                ofs += snprintf(ret + ofs, maxlen - ofs, "-%lu", (unsigned long)sid->sub_auths[i]);
index 8d66572acdb4dcf80c94c938c0dd434daecb8300..6fad9ac228de25473d35d00b734194bfbfccdf29 100644 (file)
@@ -89,7 +89,7 @@ char *secrets_fetch_machine_password(void)
  between smbd instances.
 *******************************************************************************/
 
-BOOL secrets_named_mutex(const char *name, unsigned int timeout, size_t *p_ref_count)
+BOOL secrets_named_mutex(const char *name, uint_t timeout, size_t *p_ref_count)
 {
        size_t ref_count = *p_ref_count;
        int ret = 0;
@@ -105,7 +105,7 @@ BOOL secrets_named_mutex(const char *name, unsigned int timeout, size_t *p_ref_c
 
        if (ret == 0) {
                *p_ref_count = ++ref_count;
-               DEBUG(10,("secrets_named_mutex: ref_count for mutex %s = %u\n", name, (unsigned int)ref_count ));
+               DEBUG(10,("secrets_named_mutex: ref_count for mutex %s = %u\n", name, (uint_t)ref_count ));
        }
        return (ret == 0);
 }
@@ -126,6 +126,6 @@ void secrets_named_mutex_release(const char *name, size_t *p_ref_count)
        }
 
        *p_ref_count = --ref_count;
-       DEBUG(10,("secrets_named_mutex_release: ref_count for mutex %s = %u\n", name, (unsigned int)ref_count ));
+       DEBUG(10,("secrets_named_mutex_release: ref_count for mutex %s = %u\n", name, (uint_t)ref_count ));
 }
 
index 9f8961c248789afb3c98305118d66ef675b3c58b..e645dfaf79c9b1ad4aa8bb241933366d37771447 100644 (file)
@@ -77,7 +77,7 @@ typedef int SIG_ATOMIC_T;
 
 /* Treat a mode_t as an unsigned integer */
 
-typedef unsigned int mode_t;
+typedef uint_t mode_t;
 
 /* flags to tdb_store() */
 
index 821981a1c8093a0f99142f1230dc17f116156755..d0b60fe29df30eba9be9da78c2d5aa7ad10a57b0 100644 (file)
@@ -129,7 +129,7 @@ clear a vuid out of the validity cache, and as the 'owner' of a connection.
 void conn_clear_vuid_cache(struct server_context *smb, uint16_t vuid)
 {
        struct tcon_context *conn;
-       unsigned int i;
+       uint_t i;
 
        for (conn=smb->tree.connections;conn;conn=conn->next) {
                for (i=0;i<conn->vuid_cache.entries && i< VUID_CACHE_SIZE;i++) {
index 77c04187ce8a4d48c893c939049cae1cb89de3e4..d7e26f4614f4da067bb07d4643aa2ba1fd83b148 100644 (file)
@@ -88,7 +88,7 @@ static int count_fn( TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *u
 
        if (cs->Clear && !process_exists(crec.pid) && (errno == ESRCH)) {
                DEBUG(2,("pid %u doesn't exist - deleting connections %d [%s]\n",
-                       (unsigned int)crec.pid, crec.cnum, crec.name));
+                       (uint_t)crec.pid, crec.cnum, crec.name));
                if (tdb_delete(the_tdb, kbuf) != 0)
                        DEBUG(0,("count_fn: tdb_delete failed with error %s\n", tdb_errorstr(tdb) ));
                return 0;
@@ -191,7 +191,7 @@ BOOL register_message_flags(BOOL doreg, uint32_t msg_flags)
 
        DEBUG(10,("register_message_flags: %s flags 0x%x\n",
                doreg ? "adding" : "removing",
-               (unsigned int)msg_flags ));
+               (uint_t)msg_flags ));
 
        make_conn_key(NULL, "", &kbuf, &key);
 
@@ -216,7 +216,7 @@ BOOL register_message_flags(BOOL doreg, uint32_t msg_flags)
        }
 
        DEBUG(10,("register_message_flags: new flags 0x%x\n",
-               (unsigned int)pcrec->bcast_msg_flags ));
+               (uint_t)pcrec->bcast_msg_flags ));
 
        SAFE_FREE(dbuf.dptr);
        return True;
index 8b6018575b9512670b2bdafff8051c15be049c64..ca89003cf1c0407ad1988f43a0326452f87db849 100644 (file)
@@ -131,7 +131,7 @@ int register_vuid(struct server_context *smb,
        }
 
        DEBUG(10,("register_vuid: allocated vuid = %u\n", 
-                 (unsigned int)smb->users.next_vuid));
+                 (uint_t)smb->users.next_vuid));
 
        vuser->vuid = smb->users.next_vuid;
 
index 266f543f1b1a1fc8739a5aa970a58169354ee456..1f4cffa44e79d26ab91d446d9a9f7f0d16632074 100644 (file)
@@ -321,7 +321,7 @@ static BOOL run_torture(struct cli_state *cli, int dummy)
 static BOOL rw_torture3(struct cli_state *c, const char *lockfname)
 {
        int fnum = -1;
-       unsigned int i = 0;
+       uint_t i = 0;
        char buf[131072];
        char buf_rd[131072];
        unsigned count;
@@ -613,7 +613,7 @@ static BOOL run_locktest1(int dummy)
                printf("error: This server appears not to support timed lock requests\n");
        }
        printf("server slept for %u seconds for a %u second timeout\n",
-              (unsigned int)(t2-t1), lock_timeout);
+              (uint_t)(t2-t1), lock_timeout);
 
        if (NT_STATUS_IS_ERR(cli_close(cli1->tree, fnum2))) {
                printf("close1 failed (%s)\n", cli_errstr(cli1->tree));
@@ -3363,7 +3363,7 @@ static uint32_t open_attrs_table[] = {
 };
 
 struct trunc_open_results {
-       unsigned int num;
+       uint_t num;
        uint32_t init_attr;
        uint32_t trunc_attr;
        uint32_t result_attr;
@@ -3405,7 +3405,7 @@ static BOOL run_openattrtest(int dummy)
        int fnum1;
        BOOL correct = True;
        uint16_t attr;
-       unsigned int i, j, k, l;
+       uint_t i, j, k, l;
        int failures = 0;
 
        printf("starting open attr test\n");
@@ -3485,7 +3485,7 @@ static BOOL run_openattrtest(int dummy)
                                                printf("[%d] getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x\n",
                                                        k, open_attrs_table[i],
                                                        open_attrs_table[j],
-                                                       (unsigned int)attr,
+                                                       (uint_t)attr,
                                                        attr_results[l].result_attr);
                                                correct = False;
                                                CHECK_MAX_FAILURES(error_exit);
index b78117b7ecc15cf212c0e1e6c3ec71c19a3e9a20..c97b9dc9c11477f8139040b2de796ce247e3aea8 100644 (file)
@@ -494,7 +494,7 @@ static void enum_queue(const char *queuename, uint16_t pri, uint16_t start,
 static void enum_jobs(uint16_t jobid, const char *ownername, 
                      const char *notifyname, const char *datatype,
                      const char *jparms, uint16_t pos, uint16_t status, 
-                     const char *jstatus, unsigned int submitted, unsigned int jobsize, 
+                     const char *jstatus, uint_t submitted, uint_t jobsize, 
                      const char *comment)
 {
        d_printf("     %-23.23s %5d %9d            ",
index b94887cadeb96924ab596a6ea0ef4d480e24b477..6505e6df3cad1e05394970f61d6e2ee16aec5183 100644 (file)
@@ -148,7 +148,7 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
 /****************************************************************************
 send out one query
 ****************************************************************************/
-static BOOL query_one(const char *lookup, unsigned int lookup_type)
+static BOOL query_one(const char *lookup, uint_t lookup_type)
 {
        int j, count, flags = 0;
        struct in_addr *ip_list=NULL;
@@ -207,7 +207,7 @@ static BOOL query_one(const char *lookup, unsigned int lookup_type)
 int main(int argc,char *argv[])
 {
   int opt;
-  unsigned int lookup_type = 0x0;
+  uint_t lookup_type = 0x0;
   fstring lookup;
   extern int optind;
   extern char *optarg;