summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/bitmap.c8
-rw-r--r--source4/lib/crypto/md5.c8
-rw-r--r--source4/lib/iconv.c2
-rw-r--r--source4/lib/interfaces.c2
-rw-r--r--source4/lib/pidfile.c2
-rw-r--r--source4/lib/talloc.c12
-rw-r--r--source4/lib/tdb/common/spinlock.c4
-rw-r--r--source4/lib/tdb/common/tdb.c2
-rw-r--r--source4/lib/time.c4
-rw-r--r--source4/lib/util.c2
-rw-r--r--source4/lib/wins_srv.c4
11 files changed, 25 insertions, 25 deletions
diff --git a/source4/lib/bitmap.c b/source4/lib/bitmap.c
index 2e67fb5439..5a8325d4ba 100644
--- a/source4/lib/bitmap.c
+++ b/source4/lib/bitmap.c
@@ -86,7 +86,7 @@ struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n)
/****************************************************************************
set a bit in a bitmap
****************************************************************************/
-BOOL bitmap_set(struct bitmap *bm, unsigned i)
+BOOL bitmap_set(struct bitmap *bm, uint_t i)
{
if (i >= bm->n) {
DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n",
@@ -100,7 +100,7 @@ BOOL bitmap_set(struct bitmap *bm, unsigned i)
/****************************************************************************
clear a bit in a bitmap
****************************************************************************/
-BOOL bitmap_clear(struct bitmap *bm, unsigned i)
+BOOL bitmap_clear(struct bitmap *bm, uint_t i)
{
if (i >= bm->n) {
DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n",
@@ -114,7 +114,7 @@ BOOL bitmap_clear(struct bitmap *bm, unsigned i)
/****************************************************************************
query a bit in a bitmap
****************************************************************************/
-BOOL bitmap_query(struct bitmap *bm, unsigned i)
+BOOL bitmap_query(struct bitmap *bm, uint_t i)
{
if (i >= bm->n) return False;
if (bm->b[i/32] & (1<<(i%32))) {
@@ -127,7 +127,7 @@ BOOL bitmap_query(struct bitmap *bm, unsigned i)
find a zero bit in a bitmap starting at the specified offset, with
wraparound
****************************************************************************/
-int bitmap_find(struct bitmap *bm, unsigned ofs)
+int bitmap_find(struct bitmap *bm, uint_t ofs)
{
uint_t i, j;
diff --git a/source4/lib/crypto/md5.c b/source4/lib/crypto/md5.c
index 1c53a0a152..07028e9043 100644
--- a/source4/lib/crypto/md5.c
+++ b/source4/lib/crypto/md5.c
@@ -27,12 +27,12 @@ static void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
/*
* Note: this code is harmless on little-endian machines.
*/
-static void byteReverse(uint8_t *buf, unsigned longs)
+static void byteReverse(uint8_t *buf, uint_t longs)
{
uint32_t t;
do {
- t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
- ((unsigned) buf[1] << 8 | buf[0]);
+ t = (uint32_t) ((uint_t) buf[3] << 8 | buf[2]) << 16 |
+ ((uint_t) buf[1] << 8 | buf[0]);
*(uint32_t *) buf = t;
buf += 4;
} while (--longs);
@@ -57,7 +57,7 @@ void MD5Init(struct MD5Context *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
-void MD5Update(struct MD5Context *ctx, uint8_t const *buf, unsigned len)
+void MD5Update(struct MD5Context *ctx, uint8_t const *buf, uint_t len)
{
register uint32_t t;
diff --git a/source4/lib/iconv.c b/source4/lib/iconv.c
index 65fa45248f..f75621af09 100644
--- a/source4/lib/iconv.c
+++ b/source4/lib/iconv.c
@@ -326,7 +326,7 @@ static size_t ucs2hex_pull(void *cd, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
while (*inbytesleft >= 1 && *outbytesleft >= 2) {
- unsigned v;
+ uint_t v;
if ((*inbuf)[0] != '@') {
/* seven bit ascii case */
diff --git a/source4/lib/interfaces.c b/source4/lib/interfaces.c
index 96f4b4cd94..89ed144eec 100644
--- a/source4/lib/interfaces.c
+++ b/source4/lib/interfaces.c
@@ -284,7 +284,7 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
i = ifc.ifc_len;
while (i > 0 && total < max_interfaces) {
- unsigned inc;
+ uint_t inc;
inc = ifr->ifr_addr.sa_len;
diff --git a/source4/lib/pidfile.c b/source4/lib/pidfile.c
index 7126482256..989f19b323 100644
--- a/source4/lib/pidfile.c
+++ b/source4/lib/pidfile.c
@@ -32,7 +32,7 @@ pid_t pidfile_pid(const char *name)
{
int fd;
char pidstr[20];
- unsigned ret;
+ uint_t ret;
pstring pidFile;
slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
diff --git a/source4/lib/talloc.c b/source4/lib/talloc.c
index 92e0d52d2d..f3cdd75231 100644
--- a/source4/lib/talloc.c
+++ b/source4/lib/talloc.c
@@ -53,7 +53,7 @@ struct talloc_chunk {
TALLOC_CTX *context;
size_t size;
void *ptr;
- unsigned magic;
+ uint_t magic;
};
@@ -492,7 +492,7 @@ char *talloc_describe_all(TALLOC_CTX *rt)
if (!rt) return NULL;
s = talloc_asprintf(rt, "global talloc allocations in pid: %u\n",
- (unsigned) getpid());
+ (uint_t) getpid());
s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n",
"name", "chunks", "bytes");
s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n",
@@ -517,8 +517,8 @@ char *talloc_describe_all(TALLOC_CTX *rt)
s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n",
what,
- (unsigned) n_chunks,
- (unsigned) bytes);
+ (uint_t) n_chunks,
+ (uint_t) bytes);
total_bytes += bytes;
total_chunks += n_chunks;
}
@@ -532,7 +532,7 @@ char *talloc_describe_all(TALLOC_CTX *rt)
s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n",
"TOTAL",
- (unsigned) total_chunks, (unsigned) total_bytes);
+ (uint_t) total_chunks, (uint_t) total_bytes);
return s;
}
@@ -563,7 +563,7 @@ void talloc_get_allocation(TALLOC_CTX *t,
/*
realloc an array, checking for integer overflow in the array size
*/
-void *talloc_realloc_array(TALLOC_CTX *ctx, void *ptr, size_t el_size, unsigned count)
+void *talloc_realloc_array(TALLOC_CTX *ctx, void *ptr, size_t el_size, uint_t count)
{
if (count == 0 ||
count >= MAX_TALLOC_SIZE/el_size) {
diff --git a/source4/lib/tdb/common/spinlock.c b/source4/lib/tdb/common/spinlock.c
index 0c8991c1e0..ee3eff1b31 100644
--- a/source4/lib/tdb/common/spinlock.c
+++ b/source4/lib/tdb/common/spinlock.c
@@ -420,7 +420,7 @@ int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type)
int tdb_create_rwlocks(int fd, uint_t hash_size)
{
- unsigned size, i;
+ uint_t size, i;
tdb_rwlock_t *rwlocks;
size = TDB_SPINLOCK_SIZE(hash_size);
@@ -446,7 +446,7 @@ int tdb_create_rwlocks(int fd, uint_t hash_size)
int tdb_clear_spinlocks(TDB_CONTEXT *tdb)
{
tdb_rwlock_t *rwlocks;
- unsigned i;
+ uint_t i;
if (tdb->header.rwlocks == 0) return 0;
if (!tdb->map_ptr) return -1;
diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c
index b7b9631444..d4c0928217 100644
--- a/source4/lib/tdb/common/tdb.c
+++ b/source4/lib/tdb/common/tdb.c
@@ -541,7 +541,7 @@ static tdb_off tdb_dump_record(TDB_CONTEXT *tdb, tdb_off offset)
if (tailer != rec.rec_len + sizeof(rec)) {
printf("ERROR: tailer does not match record! tailer=%u totalsize=%u\n",
- (unsigned)tailer, (unsigned)(rec.rec_len + sizeof(rec)));
+ (uint_t)tailer, (uint_t)(rec.rec_len + sizeof(rec)));
}
return rec.next;
}
diff --git a/source4/lib/time.c b/source4/lib/time.c
index 5fd8aa3081..dbbfab24b5 100644
--- a/source4/lib/time.c
+++ b/source4/lib/time.c
@@ -150,7 +150,7 @@ BOOL null_mtime(time_t mtime)
static uint16_t make_dos_date1(struct tm *t)
{
uint16_t ret=0;
- ret = (((unsigned)(t->tm_mon+1)) >> 3) | ((t->tm_year-80) << 1);
+ ret = (((uint_t)(t->tm_mon+1)) >> 3) | ((t->tm_year-80) << 1);
ret = ((ret&0xFF)<<8) | (t->tm_mday | (((t->tm_mon+1) & 0x7) << 5));
return ret;
}
@@ -161,7 +161,7 @@ static uint16_t make_dos_date1(struct tm *t)
static uint16_t make_dos_time1(struct tm *t)
{
uint16_t ret=0;
- ret = ((((unsigned)t->tm_min >> 3)&0x7) | (((unsigned)t->tm_hour) << 3));
+ ret = ((((uint_t)t->tm_min >> 3)&0x7) | (((uint_t)t->tm_hour) << 3));
ret = ((ret&0xFF)<<8) | ((t->tm_sec/2) | ((t->tm_min & 0x7) << 5));
return ret;
}
diff --git a/source4/lib/util.c b/source4/lib/util.c
index e8ad79af0c..16f5e7a888 100644
--- a/source4/lib/util.c
+++ b/source4/lib/util.c
@@ -982,7 +982,7 @@ void dump_data_pw(const char *msg, const uint8_t * data, size_t len)
/* see if a range of memory is all zero. A NULL pointer is considered
to be all zero */
-BOOL all_zero(const char *ptr, unsigned size)
+BOOL all_zero(const char *ptr, uint_t size)
{
int i;
if (!ptr) return True;
diff --git a/source4/lib/wins_srv.c b/source4/lib/wins_srv.c
index 30e81b08ab..71368658b0 100644
--- a/source4/lib/wins_srv.c
+++ b/source4/lib/wins_srv.c
@@ -139,7 +139,7 @@ void wins_srv_died(struct in_addr wins_ip, struct in_addr src_ip)
/*
return the total number of wins servers, dead or not
*/
-unsigned wins_srv_count(void)
+uint_t wins_srv_count(void)
{
const char **list;
int count = 0;
@@ -327,7 +327,7 @@ exit:
return a count of the number of IPs for a particular tag, including
dead ones
*/
-unsigned wins_srv_count_tag(const char *tag)
+uint_t wins_srv_count_tag(const char *tag)
{
const char **list;
int i, count=0;