1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-07 12:23:51 +03:00

r960: convert 'unsigned int' to uint_t in the most places

metze
This commit is contained in:
Stefan Metzmacher
2004-06-01 08:12:45 +00:00
committed by Gerald (Jerry) Carter
parent 72d9c70fdd
commit 18062d2ed9
35 changed files with 89 additions and 89 deletions

View 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;
}

View 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;

View 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;

View 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 */
};

View 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

View 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;
};

View 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;

View 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 */

View 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);
}
}

View 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)));

View 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);

View 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 {

View 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);

View 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; }

View 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);

View 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

View 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;

View 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;
}

View 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();

View 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 ==

View 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;

View 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);

View 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;
}

View 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 );
}

View 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)) {

View 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];

View 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]);

View 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 ));
}

View 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() */

View 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++) {

View 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;

View 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;

View 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);

View 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 ",

View 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;