diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-06-01 08:12:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:23 -0500 |
commit | fa2e9ec311b99dee2fbff5ee5fa2c743298dacad (patch) | |
tree | 35dc6a43cb10399e427b2fcd76d24cc23c77151d | |
parent | b88fc7a3911e0ff8b6d7d324028e351281e94c46 (diff) | |
download | samba-fa2e9ec311b99dee2fbff5ee5fa2c743298dacad.tar.gz samba-fa2e9ec311b99dee2fbff5ee5fa2c743298dacad.tar.bz2 samba-fa2e9ec311b99dee2fbff5ee5fa2c743298dacad.zip |
r960: convert 'unsigned int' to uint_t in the most places
metze
(This used to be commit 18062d2ed9fc9224c43143c10efbf2f6f1f5bbe0)
35 files changed, 89 insertions, 89 deletions
diff --git a/source4/client/client.c b/source4/client/client.c index 1f813a3d18..1d428a4f0e 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -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; } diff --git a/source4/client/smbmnt.c b/source4/client/smbmnt.c index ce406179cf..5c0d7ea1b3 100644 --- a/source4/client/smbmnt.c +++ b/source4/client/smbmnt.c @@ -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; diff --git a/source4/include/cli_context.h b/source4/include/cli_context.h index 4cfdc8db91..b0e178e1d0 100644 --- a/source4/include/cli_context.h +++ b/source4/include/cli_context.h @@ -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; diff --git a/source4/include/nameserv.h b/source4/include/nameserv.h index 8b0fa835b9..2fe3fae9de 100644 --- a/source4/include/nameserv.h +++ b/source4/include/nameserv.h @@ -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 */ }; diff --git a/source4/include/registry.h b/source4/include/registry.h index 478c7919ed..db1dee9b96 100644 --- a/source4/include/registry.h +++ b/source4/include/registry.h @@ -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 diff --git a/source4/include/smb.h b/source4/include/smb.h index 178fab1db1..55dd430d05 100644 --- a/source4/include/smb.h +++ b/source4/include/smb.h @@ -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; }; diff --git a/source4/lib/bitmap.c b/source4/lib/bitmap.c index 63b093617b..2e67fb5439 100644 --- a/source4/lib/bitmap.c +++ b/source4/lib/bitmap.c @@ -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; diff --git a/source4/lib/crypto/md5.c b/source4/lib/crypto/md5.c index a393fc2532..1c53a0a152 100644 --- a/source4/lib/crypto/md5.c +++ b/source4/lib/crypto/md5.c @@ -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 */ diff --git a/source4/lib/messages.c b/source4/lib/messages.c index 9357b12f1f..b4de7c0145 100644 --- a/source4/lib/messages.c +++ b/source4/lib/messages.c @@ -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); } } diff --git a/source4/lib/pidfile.c b/source4/lib/pidfile.c index 3471f27b8e..7126482256 100644 --- a/source4/lib/pidfile.c +++ b/source4/lib/pidfile.c @@ -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))); diff --git a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c index fa4b3e4d18..36feaff907 100644 --- a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c +++ b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c @@ -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); diff --git a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c index b014f4da66..f392759b8d 100644 --- a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c +++ b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c @@ -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 { diff --git a/source4/lib/system.c b/source4/lib/system.c index 2641a180ef..8d307caea3 100644 --- a/source4/lib/system.c +++ b/source4/lib/system.c @@ -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); diff --git a/source4/lib/tdb/common/spinlock.c b/source4/lib/tdb/common/spinlock.c index 1b789d4daa..0c8991c1e0 100644 --- a/source4/lib/tdb/common/spinlock.c +++ b/source4/lib/tdb/common/spinlock.c @@ -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; } diff --git a/source4/lib/tdb/common/tdbutil.c b/source4/lib/tdb/common/tdbutil.c index 05f4713c82..6b9ad414c5 100644 --- a/source4/lib/tdb/common/tdbutil.c +++ b/source4/lib/tdb/common/tdbutil.c @@ -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); diff --git a/source4/lib/tdb/include/spinlock.h b/source4/lib/tdb/include/spinlock.h index 967fe37457..1255d455de 100644 --- a/source4/lib/tdb/include/spinlock.h +++ b/source4/lib/tdb/include/spinlock.h @@ -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 diff --git a/source4/lib/util.c b/source4/lib/util.c index dd53d2b174..2fc87241de 100644 --- a/source4/lib/util.c +++ b/source4/lib/util.c @@ -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; diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c index 0113b1ae48..7b1a81bdfd 100644 --- a/source4/lib/util_str.c +++ b/source4/lib/util_str.c @@ -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; } diff --git a/source4/libads/kerberos_verify.c b/source4/libads/kerberos_verify.c index 8b319ee554..48a8378d36 100644 --- a/source4/libads/kerberos_verify.c +++ b/source4/libads/kerberos_verify.c @@ -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(); diff --git a/source4/libads/krb5_setpw.c b/source4/libads/krb5_setpw.c index 5a736d4dcd..f6a5b9375c 100644 --- a/source4/libads/krb5_setpw.c +++ b/source4/libads/krb5_setpw.c @@ -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 == diff --git a/source4/libcli/auth/ntlmssp.h b/source4/libcli/auth/ntlmssp.h index 968911fef5..aa7aa7e02b 100644 --- a/source4/libcli/auth/ntlmssp.h +++ b/source4/libcli/auth/ntlmssp.h @@ -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; diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c index 23f3cdc4a4..7f4384a222 100644 --- a/source4/libcli/clifile.c +++ b/source4/libcli/clifile.c @@ -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); diff --git a/source4/libcli/namequery.c b/source4/libcli/namequery.c index a04e883138..fc6a93d8e1 100644 --- a/source4/libcli/namequery.c +++ b/source4/libcli/namequery.c @@ -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; } diff --git a/source4/libcli/nmblib.c b/source4/libcli/nmblib.c index 0fe9ee2453..ef61686e57 100644 --- a/source4/libcli/nmblib.c +++ b/source4/libcli/nmblib.c @@ -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 ); } diff --git a/source4/libcli/util/dom_sid.c b/source4/libcli/util/dom_sid.c index 88ece25a8e..cdf89ccf96 100644 --- a/source4/libcli/util/dom_sid.c +++ b/source4/libcli/util/dom_sid.c @@ -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)) { diff --git a/source4/libcli/util/smbdes.c b/source4/libcli/util/smbdes.c index b0efdec157..b2e46e759d 100644 --- a/source4/libcli/util/smbdes.c +++ b/source4/libcli/util/smbdes.c @@ -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]; diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c index 0c3982f390..1fe8adbf4a 100644 --- a/source4/librpc/ndr/ndr_sec.c +++ b/source4/librpc/ndr/ndr_sec.c @@ -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]); diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c index 8d66572acd..6fad9ac228 100644 --- a/source4/passdb/secrets.c +++ b/source4/passdb/secrets.c @@ -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 )); } diff --git a/source4/scripting/swig/tdb.i b/source4/scripting/swig/tdb.i index 9f8961c248..e645dfaf79 100644 --- a/source4/scripting/swig/tdb.i +++ b/source4/scripting/swig/tdb.i @@ -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() */ diff --git a/source4/smb_server/conn.c b/source4/smb_server/conn.c index 821981a1c8..d0b60fe29d 100644 --- a/source4/smb_server/conn.c +++ b/source4/smb_server/conn.c @@ -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++) { diff --git a/source4/smb_server/connection.c b/source4/smb_server/connection.c index 77c04187ce..d7e26f4614 100644 --- a/source4/smb_server/connection.c +++ b/source4/smb_server/connection.c @@ -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; diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c index 8b6018575b..ca89003cf1 100644 --- a/source4/smb_server/password.c +++ b/source4/smb_server/password.c @@ -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; diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 266f543f1b..1f4cffa44e 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -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); diff --git a/source4/utils/net_rap.c b/source4/utils/net_rap.c index b78117b7ec..c97b9dc9c1 100644 --- a/source4/utils/net_rap.c +++ b/source4/utils/net_rap.c @@ -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 ", diff --git a/source4/utils/nmblookup.c b/source4/utils/nmblookup.c index b94887cade..6505e6df3c 100644 --- a/source4/utils/nmblookup.c +++ b/source4/utils/nmblookup.c @@ -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; |