#ifdef HAVE_LDAP_SASL
static int
-sasl_interact(LDAP *ld ATTR_UNUSED, unsigned flags ATTR_UNUSED,
+sasl_interact(LDAP *ld ATTR_UNUSED, unsigned int flags ATTR_UNUSED,
void *defaults, void *interact)
{
struct db_ldap_sasl_bind_context *context = defaults;
enable = FALSE;
++p;
}
- for (unsigned i = 0; i < N_ELEMENTS(protocol_versions); i++) {
+ for (unsigned int i = 0; i < N_ELEMENTS(protocol_versions); i++) {
if (strcmp(p, protocol_versions[i]) == 0) {
if (enable) {
protos[i] = 1;
found:;
}
- unsigned min = N_ELEMENTS(protocol_versions);
- for (unsigned i = 0; i < N_ELEMENTS(protocol_versions); i++) {
+ unsigned int min = N_ELEMENTS(protocol_versions);
+ for (unsigned int i = 0; i < N_ELEMENTS(protocol_versions); i++) {
if (explicit_enable) {
if (protos[i] > 0)
min = I_MIN(min, i);
bool version_string_verify(const char *line ATTR_UNUSED,
const char *service_name ATTR_UNUSED,
- unsigned major_version ATTR_UNUSED)
+ unsigned int major_version ATTR_UNUSED)
{
return FALSE;
}
buffer_t *buffer;
const char *values[2];
char *path;
- unsigned cptr;
+ unsigned int cptr;
char *error;
};
const char **error_r)
{
struct cdb_dict *dict = (struct cdb_dict *)_dict;
- unsigned datalen;
+ unsigned int datalen;
int ret = 0;
char *data;
/* keys and values may be null terminated... */
if ((dict->flag & CDB_WITH_NULL) != 0) {
- ret = cdb_find(&dict->cdb, key, (unsigned)strlen(key)+1);
+ ret = cdb_find(&dict->cdb, key, (unsigned int)strlen(key)+1);
if (ret > 0)
dict->flag &= ENUM_NEGATE(CDB_WITHOUT_NULL);
}
/* ...or not */
if (ret == 0 && (dict->flag & CDB_WITHOUT_NULL) != 0) {
- ret = cdb_find(&dict->cdb, key, (unsigned)strlen(key));
+ ret = cdb_find(&dict->cdb, key, (unsigned int)strlen(key));
if (ret > 0)
dict->flag &= ENUM_NEGATE(CDB_WITH_NULL);
}
{
struct cdb_dict *dict = (struct cdb_dict *)ctx->ctx.dict;
char *data;
- unsigned datalen;
+ unsigned int datalen;
int ret;
if ((ret = cdb_seqnext(&ctx->cptr, &dict->cdb)) < 1) {
const char *key;
bool match = FALSE;
char *data;
- unsigned datalen;
+ unsigned int datalen;
if (ctx->error != NULL)
return FALSE;
char *uri;
enum dict_data_type value_type;
- unsigned warn_slow_msecs;
+ unsigned int warn_slow_msecs;
time_t last_failed_connect;
char *last_connect_error;
{
struct lua_dict_iter *iter;
const int *refs;
- unsigned nrefs;
+ unsigned int nrefs;
DLUA_REQUIRE_ARGS(L, 2);
/* Override with available client settings */
for (client = cctx->clients_list; client != NULL;
client = client->next) {
- unsigned dns_lookup_timeout_msecs =
+ unsigned int dns_lookup_timeout_msecs =
http_client_get_dns_lookup_timeout_msecs(&client->set);
if (cctx->dns_client == NULL)
static in_port_t bind_port = 0;
static int fd_listen = -1;
static struct ioloop *ioloop_nested = NULL;
-static unsigned ioloop_nested_first = 0;
-static unsigned ioloop_nested_last = 0;
-static unsigned ioloop_nested_depth = 0;
+static unsigned int ioloop_nested_first = 0;
+static unsigned int ioloop_nested_last = 0;
+static unsigned int ioloop_nested_depth = 0;
static void main_deinit(void);
if (ip->family == 0)
return FALSE;
if (ip->family == AF_INET) {
-#define IP4(a,b,c,d) ((unsigned)(a)<<24|(unsigned)(b)<<16|(unsigned)(c)<<8|(unsigned)(d))
+#define IP4(a,b,c,d) ((unsigned int)(a)<<24|(unsigned int)(b)<<16|(unsigned int)(c)<<8|(unsigned int)(d))
addr = ip->u.ip4.s_addr;
if (addr >= IP4(10,0,0,0) && addr <= IP4(10,255,255,255))
return FALSE; /* 10/8 */
#include "mail-index-sync-private.h"
struct mail_cache_sync_context {
- unsigned expunge_count;
+ unsigned int expunge_count;
};
void mail_cache_expunge_count(struct mail_cache *cache, unsigned int count)
\
index = NULL; \
if (extra_fxns != NULL) { \
- unsigned i; \
+ unsigned int i; \
\
luaL_setfuncs(state, extra_fxns, 0); \
\
}
bool version_string_verify(const char *line, const char *service_name,
- unsigned major_version)
+ unsigned int major_version)
{
unsigned int minor_version;
}
bool version_string_verify_full(const char *line, const char *service_name,
- unsigned major_version,
+ unsigned int major_version,
unsigned int *minor_version_r)
{
size_t service_name_len = strlen(service_name);
The line is expected to be in format:
VERSION <tab> service_name <tab> major version <tab> minor version */
bool version_string_verify(const char *line, const char *service_name,
- unsigned major_version);
+ unsigned int major_version);
/* Same as version_string_verify(), but return the minor version. */
bool version_string_verify_full(const char *line, const char *service_name,
- unsigned major_version,
+ unsigned int major_version,
unsigned int *minor_version_r);
/* Sets process shutdown filter */
int openssl_min_protocol_to_options(const char *min_protocol, long *opt_r,
int *version_r)
{
- unsigned i = 0;
+ unsigned int i = 0;
for (; i < N_ELEMENTS(protocol_versions); i++) {
if (strcasecmp(protocol_versions[i].name, min_protocol) == 0)
break;
static inline unsigned int ATTR_CONST
bits_fraclog(unsigned int val, unsigned int fracbits)
{
- unsigned bits = bits_required32(val);
+ unsigned int bits = bits_required32(val);
if (bits <= fracbits + 1)
return val;
static int json_parse_denest(struct json_parser *parser)
{
const enum json_state *nested_states;
- unsigned count;
+ unsigned int count;
parser->data++;
json_parser_update_input_pos(parser);
time_t t;
test_begin("time_to_local_day_start()");
- for (unsigned i = 0; i < N_ELEMENTS(tests); i++) {
+ for (unsigned int i = 0; i < N_ELEMENTS(tests); i++) {
tm_copy = tests[i];
tm_copy.tm_isdst = -1;
t = mktime(&tm_copy);
{
/* %G:%H:%M:%S */
const char **t = t_strsplit(ts, ":");
- unsigned len = str_array_length(t);
+ unsigned int len = str_array_length(t);
test_assert_idx(len == 4, idx);
/* %G - ISO 8601 year */
test_assert_idx(strlen(t[0]) == 4, idx);
- unsigned v = 0;
+ unsigned int v = 0;
test_assert_idx(str_to_uint(t[0], &v) == 0, idx);
test_assert_idx(1000 <= v, idx);
test_assert_idx(v <= 3000, idx);
},
};
-static const unsigned tests_count = N_ELEMENTS(tests);
+static const unsigned int tests_count = N_ELEMENTS(tests);
static void
test_solr_result(const struct solr_response_test_result *test_results,
struct fts_expunge_log_mailbox {
guid_128_t guid;
ARRAY_TYPE(seq_range) uids;
- unsigned uids_count;
+ unsigned int uids_count;
};
struct fts_expunge_log_append_ctx {
static int
pop3_map_read_hdr_hashes(struct mail_storage *storage, struct mailbox *pop3_box,
- unsigned first_seq)
+ unsigned int first_seq)
{
struct pop3_migration_mail_storage *mstorage =
POP3_MIGRATION_CONTEXT_REQUIRE(storage);
void *context ATTR_UNUSED)
{
static time_t last_log;
- static unsigned suppressed;
+ static unsigned int suppressed;
if (http_response_is_success(response))
return;