summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-05-19 20:10:52 +0200
committerJeremy Allison <jra@samba.org>2022-05-20 19:02:37 +0000
commit78ebd8af885841a39eece623623a7807a83903c4 (patch)
tree91f06a2cd3ba7e4503839b4faaffc4404517cba7 /source3/registry
parenta771f1d314bc41b59a279b1859ed28714bed3040 (diff)
downloadsamba-78ebd8af885841a39eece623623a7807a83903c4.tar.gz
registry3: Align some integer types
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c6
-rw-r--r--source3/registry/reg_parse.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index b1f6425d56a..829b82d9059 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1045,7 +1045,7 @@ static WERROR regdb_store_keys_internal2(struct db_context *db,
{
TDB_DATA dbuf;
uint8_t *buffer = NULL;
- int i = 0;
+ uint32_t i = 0;
uint32_t len, buflen;
uint32_t num_subkeys = regsubkey_ctr_numkeys(ctr);
char *keyname = NULL;
@@ -1739,7 +1739,7 @@ static WERROR regdb_fetch_keys_internal(struct db_context *db, const char *key,
uint32_t num_items;
uint8_t *buf;
uint32_t buflen, len;
- int i;
+ uint32_t i;
fstring subkeyname;
TALLOC_CTX *frame = talloc_stackframe();
TDB_DATA value;
@@ -1854,7 +1854,7 @@ static int regdb_unpack_values(struct regval_ctr *values,
uint32_t size;
uint8_t *data_p;
uint32_t num_values = 0;
- int i;
+ uint32_t i;
/* loop and unpack the rest of the registry values */
diff --git a/source3/registry/reg_parse.c b/source3/registry/reg_parse.c
index 6230b000c3b..dc084dc51b7 100644
--- a/source3/registry/reg_parse.c
+++ b/source3/registry/reg_parse.c
@@ -641,7 +641,7 @@ static bool lookslike_utf16(const char* line, size_t len, bool* little_endian)
size_t l = MIN(len/2, 64);
const uint16_t* u = (const uint16_t*)line;
- int i;
+ size_t i;
assert(len >= 2);
@@ -667,7 +667,7 @@ static bool lookslike_utf16(const char* line, size_t len, bool* little_endian)
static bool lookslike_dos(const char* line, size_t len)
{
- int i;
+ size_t i;
for (i=0; i<len; i++) {
if ( (line[i] == '\0') || (line[i] & 0x80) ) {
return false;