summaryrefslogtreecommitdiff
path: root/source4/lib/registry/ldb.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-07 21:07:20 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-06 17:48:25 +0100
commit89ab6818e170b305a70b7258ac11e11a2eb53aeb (patch)
tree3dad36645e6776fdda1bd1162f9338a88c3df38c /source4/lib/registry/ldb.c
parent5a3633faf12cdec41dc18064d5364a3fd067a22d (diff)
downloadsamba-89ab6818e170b305a70b7258ac11e11a2eb53aeb.tar.gz
samba-89ab6818e170b305a70b7258ac11e11a2eb53aeb.tar.bz2
samba-89ab6818e170b305a70b7258ac11e11a2eb53aeb.zip
s4:libregistry - change counters to be "unsigned"
Also the s4 registry library has to have "unsigned" counters like the Windows one.
Diffstat (limited to 'source4/lib/registry/ldb.c')
-rw-r--r--source4/lib/registry/ldb.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 68639f5b5c..8ed4b5d847 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -34,7 +34,7 @@ struct ldb_key_data
struct ldb_context *ldb;
struct ldb_dn *dn;
struct ldb_message **subkeys, **values;
- int subkey_count, value_count;
+ unsigned int subkey_count, value_count;
};
static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
@@ -329,7 +329,7 @@ static WERROR ldb_get_default_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
}
static WERROR ldb_get_value_by_id(TALLOC_CTX *mem_ctx, struct hive_key *k,
- int idx, const char **name,
+ uint32_t idx, const char **name,
uint32_t *data_type, DATA_BLOB *data)
{
struct ldb_key_data *kd = talloc_get_type(k, struct ldb_key_data);
@@ -572,7 +572,8 @@ static WERROR ldb_del_value (struct hive_key *key, const char *child)
static WERROR ldb_del_key(const struct hive_key *key, const char *name)
{
- int i, ret;
+ unsigned int i;
+ int ret;
struct ldb_key_data *parentkd = talloc_get_type(key, struct ldb_key_data);
struct ldb_dn *ldap_path;
TALLOC_CTX *mem_ctx = talloc_init("ldb_del_key");
@@ -711,7 +712,7 @@ static WERROR ldb_set_value(struct hive_key *parent,
ret = ldb_add(kd->ldb, msg);
if (ret == LDB_ERR_ENTRY_ALREADY_EXISTS) {
- int i;
+ unsigned int i;
for (i = 0; i < msg->num_elements; i++) {
if (msg->elements[i].flags != LDB_FLAG_MOD_DELETE)
msg->elements[i].flags = LDB_FLAG_MOD_REPLACE;
@@ -778,7 +779,7 @@ static WERROR ldb_get_key_info(TALLOC_CTX *mem_ctx,
if (max_subkeynamelen != NULL) {
- int i;
+ unsigned int i;
struct ldb_message_element *el;
*max_subkeynamelen = 0;
@@ -790,7 +791,7 @@ static WERROR ldb_get_key_info(TALLOC_CTX *mem_ctx,
}
if (max_valnamelen != NULL || max_valbufsize != NULL) {
- int i;
+ unsigned int i;
struct ldb_message_element *el;
W_ERROR_NOT_OK_RETURN(cache_values(kd));