diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-18 17:40:25 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-18 17:40:25 -0700 |
commit | 30191d1a5704ad2b158386b511558972d539ce47 (patch) | |
tree | 4f46e5c4f28f672ab661aa18f45745860970a88c /source3/registry | |
parent | 789856f63ff73fec66298e95c91c60db7bdaf14e (diff) | |
download | samba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz samba-30191d1a5704ad2b158386b511558972d539ce47.tar.xz samba-30191d1a5704ad2b158386b511558972d539ce47.zip |
RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_api.c | 2 | ||||
-rw-r--r-- | source3/registry/reg_cachehook.c | 4 | ||||
-rw-r--r-- | source3/registry/reg_db.c | 12 | ||||
-rw-r--r-- | source3/registry/reg_dynamic.c | 2 | ||||
-rw-r--r-- | source3/registry/reg_eventlog.c | 6 | ||||
-rw-r--r-- | source3/registry/reg_frontend.c | 2 | ||||
-rw-r--r-- | source3/registry/reg_frontend_hilvl.c | 6 | ||||
-rw-r--r-- | source3/registry/reg_objects.c | 4 | ||||
-rw-r--r-- | source3/registry/reg_perfcount.c | 42 | ||||
-rw-r--r-- | source3/registry/reg_printing.c | 14 | ||||
-rw-r--r-- | source3/registry/reg_shares.c | 8 | ||||
-rw-r--r-- | source3/registry/reg_smbconf.c | 8 | ||||
-rw-r--r-- | source3/registry/reg_util.c | 4 | ||||
-rw-r--r-- | source3/registry/regfio.c | 46 |
14 files changed, 80 insertions, 80 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 8b832cfa91..17a0efe007 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -712,7 +712,7 @@ WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path, WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx, struct registry_key *parent, const char *path, - BOOL del_key) + bool del_key) { TALLOC_CTX *mem_ctx = NULL; WERROR werr = WERR_OK; diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index 87bbdf504f..739facac99 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -33,7 +33,7 @@ static REGISTRY_HOOK default_hook = { KEY_TREE_ROOT, ®db_ops }; Initialize the cache tree *********************************************************************/ -BOOL reghook_cache_init( void ) +bool reghook_cache_init( void ) { cache_tree = pathtree_init( &default_hook, NULL ); @@ -45,7 +45,7 @@ BOOL reghook_cache_init( void ) is not in the exact format that a SORTED_TREE expects. *********************************************************************/ -BOOL reghook_cache_add( REGISTRY_HOOK *hook ) +bool reghook_cache_add( REGISTRY_HOOK *hook ) { pstring key; diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 39411fe150..99330120e5 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -83,7 +83,7 @@ static struct builtin_regkey_value builtin_registry_values[] = { Open the registry data in the tdb ***********************************************************************/ -static BOOL init_registry_data( void ) +static bool init_registry_data( void ) { pstring path, base, remaining; fstring keyname, subkeyname; @@ -222,7 +222,7 @@ static BOOL init_registry_data( void ) Open the registry database ***********************************************************************/ -BOOL regdb_init( void ) +bool regdb_init( void ) { const char *vstring = "INFO/version"; uint32 vers_id; @@ -327,13 +327,13 @@ int regdb_get_seqnum(void) fstrings ***********************************************************************/ -static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr ) +static bool regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr ) { TDB_DATA dbuf; uint8 *buffer; int i = 0; uint32 len, buflen; - BOOL ret = True; + bool ret = True; uint32 num_subkeys = regsubkey_ctr_numkeys( ctr ); pstring keyname; @@ -392,7 +392,7 @@ done: do not currently exist ***********************************************************************/ -BOOL regdb_store_keys( const char *key, REGSUBKEY_CTR *ctr ) +bool regdb_store_keys( const char *key, REGSUBKEY_CTR *ctr ) { int num_subkeys, i; pstring path; @@ -686,7 +686,7 @@ int regdb_fetch_values( const char* key, REGVAL_CTR *values ) return regval_ctr_numvals(values); } -BOOL regdb_store_values( const char *key, REGVAL_CTR *values ) +bool regdb_store_values( const char *key, REGVAL_CTR *values ) { TDB_DATA old_data, data; pstring keystr; diff --git a/source3/registry/reg_dynamic.c b/source3/registry/reg_dynamic.c index da12b1debb..472760eacf 100644 --- a/source3/registry/reg_dynamic.c +++ b/source3/registry/reg_dynamic.c @@ -229,7 +229,7 @@ int fetch_dynamic_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) /*********************************************************************** ***********************************************************************/ -BOOL check_dynamic_reg_values( REGISTRY_KEY *key ) +bool check_dynamic_reg_values( REGISTRY_KEY *key ) { int i; pstring path; diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c index e995ed2e96..a9369b9ddf 100644 --- a/source3/registry/reg_eventlog.c +++ b/source3/registry/reg_eventlog.c @@ -29,7 +29,7 @@ for an eventlog, add in the default values *********************************************************************/ -BOOL eventlog_init_keys( void ) +bool eventlog_init_keys( void ) { /* Find all of the eventlogs, add keys for each of them */ const char **elogs = lp_eventlog_list( ); @@ -175,7 +175,7 @@ BOOL eventlog_init_keys( void ) already exists, change the information (remove, replace) *********************************************************************/ -BOOL eventlog_add_source( const char *eventlog, const char *sourcename, +bool eventlog_add_source( const char *eventlog, const char *sourcename, const char *messagefile ) { /* Find all of the eventlogs, add keys for each of them */ @@ -191,7 +191,7 @@ BOOL eventlog_add_source( const char *eventlog, const char *sourcename, UNISTR2 data; uint16 *msz_wp; int mbytes, ii; - BOOL already_in; + bool already_in; int i; int numsources; diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 1a82db3673..00972390bd 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -48,7 +48,7 @@ REGISTRY_HOOK reg_hooks[] = { Open the registry database and initialize the REGISTRY_HOOK cache ***********************************************************************/ -BOOL init_registry( void ) +bool init_registry( void ) { int i; diff --git a/source3/registry/reg_frontend_hilvl.c b/source3/registry/reg_frontend_hilvl.c index de64beb9dc..08429c6dfe 100644 --- a/source3/registry/reg_frontend_hilvl.c +++ b/source3/registry/reg_frontend_hilvl.c @@ -74,7 +74,7 @@ static SEC_DESC* construct_registry_sd( TALLOC_CTX *ctx ) High level wrapper function for storing registry subkeys ***********************************************************************/ -BOOL store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys ) +bool store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys ) { if ( key->hook && key->hook->ops && key->hook->ops->store_subkeys ) return key->hook->ops->store_subkeys( key->name, subkeys ); @@ -87,7 +87,7 @@ BOOL store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys ) High level wrapper function for storing registry values ***********************************************************************/ -BOOL store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) +bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) { if ( check_dynamic_reg_values( key ) ) return False; @@ -140,7 +140,7 @@ int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) underlying registry backend ***********************************************************************/ -BOOL regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted, +bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted, const struct nt_user_token *token ) { SEC_DESC *sec_desc; diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 18eb6048ff..fa531af10c 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -107,7 +107,7 @@ int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname ) Check for the existance of a key **********************************************************************/ -BOOL regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname ) +bool regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname ) { int i; @@ -260,7 +260,7 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) Check for the existance of a value **********************************************************************/ -BOOL regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value ) +bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value ) { int i; diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c index afa1bf30e5..44b5a5e289 100644 --- a/source3/registry/reg_perfcount.c +++ b/source3/registry/reg_perfcount.c @@ -314,7 +314,7 @@ static void _reg_perfcount_make_key(TDB_DATA *key, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_isparent(TDB_DATA data) +static bool _reg_perfcount_isparent(TDB_DATA data) { if(data.dsize > 0) { @@ -329,7 +329,7 @@ static BOOL _reg_perfcount_isparent(TDB_DATA data) /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_ischild(TDB_DATA data) +static bool _reg_perfcount_ischild(TDB_DATA data) { if(data.dsize > 0) { @@ -364,14 +364,14 @@ static uint32 _reg_perfcount_get_numinst(int objInd, TDB_CONTEXT *names) /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_add_object(PERF_DATA_BLOCK *block, +static bool _reg_perfcount_add_object(PERF_DATA_BLOCK *block, prs_struct *ps, int num, TDB_DATA data, TDB_CONTEXT *names) { int i; - BOOL success = True; + bool success = True; PERF_OBJECT_TYPE *obj; block->objects = (PERF_OBJECT_TYPE *)TALLOC_REALLOC_ARRAY(ps->mem_ctx, @@ -406,7 +406,7 @@ static BOOL _reg_perfcount_add_object(PERF_DATA_BLOCK *block, /********************************************************************* *********************************************************************/ -BOOL _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data) +bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data) { TDB_CONTEXT *counters; const char *fname = counters_directory( DATA_DB ); @@ -468,7 +468,7 @@ static uint32 _reg_perfcount_compute_scale(SMB_BIG_INT data) /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_get_counter_info(PERF_DATA_BLOCK *block, +static bool _reg_perfcount_get_counter_info(PERF_DATA_BLOCK *block, prs_struct *ps, int CounterIndex, PERF_OBJECT_TYPE *obj, @@ -597,7 +597,7 @@ PERF_OBJECT_TYPE *_reg_perfcount_find_obj(PERF_DATA_BLOCK *block, int objind) /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_add_counter(PERF_DATA_BLOCK *block, +static bool _reg_perfcount_add_counter(PERF_DATA_BLOCK *block, prs_struct *ps, int num, TDB_DATA data, @@ -606,7 +606,7 @@ static BOOL _reg_perfcount_add_counter(PERF_DATA_BLOCK *block, char *begin, *end, *start, *stop; int parent; PERF_OBJECT_TYPE *obj; - BOOL success = True; + bool success = True; char buf[PERFCOUNT_MAX_LEN]; obj = NULL; @@ -659,7 +659,7 @@ static BOOL _reg_perfcount_add_counter(PERF_DATA_BLOCK *block, /********************************************************************* *********************************************************************/ -BOOL _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst, +bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst, prs_struct *ps, int instId, PERF_OBJECT_TYPE *obj, @@ -746,7 +746,7 @@ BOOL _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst, /********************************************************************* *********************************************************************/ -BOOL _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj, +bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj, prs_struct *ps, int instInd, TDB_CONTEXT *names) @@ -775,7 +775,7 @@ static int _reg_perfcount_assemble_global(PERF_DATA_BLOCK *block, int base_index, TDB_CONTEXT *names) { - BOOL success; + bool success; int i, j, retval = 0; char keybuf[PERFCOUNT_MAX_LEN]; TDB_DATA key, data; @@ -812,7 +812,7 @@ static int _reg_perfcount_assemble_global(PERF_DATA_BLOCK *block, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_get_64(SMB_BIG_UINT *retval, +static bool _reg_perfcount_get_64(SMB_BIG_UINT *retval, TDB_CONTEXT *tdb, int key_part1, const char *key_part2) @@ -841,12 +841,12 @@ static BOOL _reg_perfcount_get_64(SMB_BIG_UINT *retval, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_init_data_block_perf(PERF_DATA_BLOCK *block, +static bool _reg_perfcount_init_data_block_perf(PERF_DATA_BLOCK *block, TDB_CONTEXT *names) { SMB_BIG_UINT PerfFreq, PerfTime, PerfTime100nSec; TDB_CONTEXT *counters; - BOOL status = False; + bool status = False; const char *fname = counters_directory( DATA_DB ); counters = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDONLY, 0444); @@ -888,7 +888,7 @@ static BOOL _reg_perfcount_init_data_block_perf(PERF_DATA_BLOCK *block, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_init_data_block(PERF_DATA_BLOCK *block, +static bool _reg_perfcount_init_data_block(PERF_DATA_BLOCK *block, prs_struct *ps, TDB_CONTEXT *names) { wpstring temp; @@ -1075,7 +1075,7 @@ uint32 reg_perfcount_get_perf_data_block(uint32 base_index, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_marshall_perf_data_block(prs_struct *ps, PERF_DATA_BLOCK block, int depth) +static bool _reg_perfcount_marshall_perf_data_block(prs_struct *ps, PERF_DATA_BLOCK block, int depth) { int i; prs_debug(ps, depth, "", "_reg_perfcount_marshall_perf_data_block"); @@ -1129,7 +1129,7 @@ static BOOL _reg_perfcount_marshall_perf_data_block(prs_struct *ps, PERF_DATA_BL /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_marshall_perf_counters(prs_struct *ps, +static bool _reg_perfcount_marshall_perf_counters(prs_struct *ps, PERF_OBJECT_TYPE object, int depth) { @@ -1173,7 +1173,7 @@ static BOOL _reg_perfcount_marshall_perf_counters(prs_struct *ps, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_marshall_perf_counter_data(prs_struct *ps, +static bool _reg_perfcount_marshall_perf_counter_data(prs_struct *ps, PERF_COUNTER_BLOCK counter_data, int depth) { @@ -1196,7 +1196,7 @@ static BOOL _reg_perfcount_marshall_perf_counter_data(prs_struct *ps, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_marshall_perf_instances(prs_struct *ps, +static bool _reg_perfcount_marshall_perf_instances(prs_struct *ps, PERF_OBJECT_TYPE object, int depth) { @@ -1237,7 +1237,7 @@ static BOOL _reg_perfcount_marshall_perf_instances(prs_struct *ps, /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_marshall_perf_objects(prs_struct *ps, PERF_DATA_BLOCK block, int depth) +static bool _reg_perfcount_marshall_perf_objects(prs_struct *ps, PERF_DATA_BLOCK block, int depth) { int obj; @@ -1307,7 +1307,7 @@ static BOOL _reg_perfcount_marshall_perf_objects(prs_struct *ps, PERF_DATA_BLOCK /********************************************************************* *********************************************************************/ -static BOOL _reg_perfcount_marshall_hkpd(prs_struct *ps, PERF_DATA_BLOCK block) +static bool _reg_perfcount_marshall_hkpd(prs_struct *ps, PERF_DATA_BLOCK block) { int depth = 0; if(_reg_perfcount_marshall_perf_data_block(ps, block, depth) == True) diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 3ced400721..47582c51f7 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -43,9 +43,9 @@ struct reg_dyn_tree { /* callbscks for fetch/store operations */ int ( *fetch_subkeys) ( const char *path, REGSUBKEY_CTR *subkeys ); - BOOL (*store_subkeys) ( const char *path, REGSUBKEY_CTR *subkeys ); + bool (*store_subkeys) ( const char *path, REGSUBKEY_CTR *subkeys ); int (*fetch_values) ( const char *path, REGVAL_CTR *values ); - BOOL (*store_values) ( const char *path, REGVAL_CTR *values ); + bool (*store_values) ( const char *path, REGVAL_CTR *values ); }; /********************************************************************* @@ -264,7 +264,7 @@ done: keyname is the sharename and not the printer name. *********************************************************************/ -static BOOL add_printers_by_registry( REGSUBKEY_CTR *subkeys ) +static bool add_printers_by_registry( REGSUBKEY_CTR *subkeys ) { int i, num_keys, snum; char *printername; @@ -299,7 +299,7 @@ static BOOL add_printers_by_registry( REGSUBKEY_CTR *subkeys ) /********************************************************************** *********************************************************************/ -static BOOL key_printers_store_keys( const char *key, REGSUBKEY_CTR *subkeys ) +static bool key_printers_store_keys( const char *key, REGSUBKEY_CTR *subkeys ) { char *printers_key; char *printername, *printerdatakey; @@ -663,7 +663,7 @@ static void convert_values_to_printer_info_2( NT_PRINTER_INFO_LEVEL_2 *printer2, /********************************************************************** *********************************************************************/ -static BOOL key_printers_store_values( const char *key, REGVAL_CTR *values ) +static bool key_printers_store_values( const char *key, REGVAL_CTR *values ) { char *printers_key; char *printername, *keyname; @@ -1184,7 +1184,7 @@ static int regprint_fetch_reg_keys( const char *key, REGSUBKEY_CTR *subkeys ) /********************************************************************** *********************************************************************/ -static BOOL regprint_store_reg_keys( const char *key, REGSUBKEY_CTR *subkeys ) +static bool regprint_store_reg_keys( const char *key, REGSUBKEY_CTR *subkeys ) { int i = match_registry_path( key ); @@ -1219,7 +1219,7 @@ static int regprint_fetch_reg_values( const char *key, REGVAL_CTR *values ) /********************************************************************** *********************************************************************/ -static BOOL regprint_store_reg_values( const char *key, REGVAL_CTR *values ) +static bool regprint_store_reg_values( const char *key, REGVAL_CTR *values ) { int i = match_registry_path( key ); diff --git a/source3/registry/reg_shares.c b/source3/registry/reg_shares.c index 09691bc26a..178f23e21c 100644 --- a/source3/registry/reg_shares.c +++ b/source3/registry/reg_shares.c @@ -69,7 +69,7 @@ static char* trim_reg_path( const char *path ) static int shares_subkey_info( const char *key, REGSUBKEY_CTR *subkey_ctr ) { char *path; - BOOL top_level = False; + bool top_level = False; int num_subkeys = 0; DEBUG(10,("printing_subkey_info: key=>[%s]\n", key)); @@ -103,7 +103,7 @@ static int shares_subkey_info( const char *key, REGSUBKEY_CTR *subkey_ctr ) static int shares_value_info( const char *key, REGVAL_CTR *val ) { char *path; - BOOL top_level = False; + bool top_level = False; int num_values = 0; DEBUG(10,("printing_value_info: key=>[%s]\n", key)); @@ -134,7 +134,7 @@ static int shares_value_info( const char *key, REGVAL_CTR *val ) (for now at least) *********************************************************************/ -static BOOL shares_store_subkey( const char *key, REGSUBKEY_CTR *subkeys ) +static bool shares_store_subkey( const char *key, REGSUBKEY_CTR *subkeys ) { return False; } @@ -145,7 +145,7 @@ static BOOL shares_store_subkey( const char *key, REGSUBKEY_CTR *subkeys ) (for now at least) *********************************************************************/ -static BOOL shares_store_value( const char *key, REGVAL_CTR *val ) +static bool shares_store_value( const char *key, REGVAL_CTR *val ) { return False; } diff --git a/source3/registry/reg_smbconf.c b/source3/registry/reg_smbconf.c index 448d1d77e0..116cde936e 100644 --- a/source3/registry/reg_smbconf.c +++ b/source3/registry/reg_smbconf.c @@ -30,7 +30,7 @@ static int smbconf_fetch_keys( const char *key, REGSUBKEY_CTR *subkey_ctr ) return regdb_ops.fetch_subkeys(key, subkey_ctr); } -static BOOL smbconf_store_keys( const char *key, REGSUBKEY_CTR *subkeys ) +static bool smbconf_store_keys( const char *key, REGSUBKEY_CTR *subkeys ) { return regdb_ops.store_subkeys(key, subkeys); } @@ -93,7 +93,7 @@ static REGISTRY_VALUE *smbconf_canonicalize_regval(TALLOC_CTX *mem_ctx, size_t len; const char *canon_valname; const char *canon_valstr; - BOOL inverse; + bool inverse; struct registry_value *value; WERROR err; TALLOC_CTX *tmp_ctx; @@ -160,7 +160,7 @@ done: return newval; } -static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val ) +static bool smbconf_store_values( const char *key, REGVAL_CTR *val ) { int i; int num_values = regval_ctr_numvals(val); @@ -235,7 +235,7 @@ static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val ) return regdb_ops.store_values(key, new_val_ctr); } -static BOOL smbconf_reg_access_check(const char *keyname, uint32 requested, +static bool smbconf_reg_access_check(const char *keyname, uint32 requested, uint32 *granted, const struct nt_user_token *token) { diff --git a/source3/registry/reg_util.c b/source3/registry/reg_util.c index e911d6af8c..7eb3c2a3a5 100644 --- a/source3/registry/reg_util.c +++ b/source3/registry/reg_util.c @@ -32,7 +32,7 @@ WARNING!! Does modify the original string! ***********************************************************************/ -BOOL reg_split_path( char *path, char **base, char **new_path ) +bool reg_split_path( char *path, char **base, char **new_path ) { char *p; @@ -62,7 +62,7 @@ BOOL reg_split_path( char *path, char **base, char **new_path ) WARNING!! Does modify the original string! ***********************************************************************/ -BOOL reg_split_key( char *path, char **base, char **key ) +bool reg_split_key( char *path, char **base, char **key ) { char *p; diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c index 93a27700b3..22700e6481 100644 --- a/source3/registry/regfio.c +++ b/source3/registry/regfio.c @@ -146,7 +146,7 @@ static int read_block( REGF_FILE *file, prs_struct *ps, uint32 file_offset, uint /******************************************************************* *******************************************************************/ -static BOOL write_hbin_block( REGF_FILE *file, REGF_HBIN *hbin ) +static bool write_hbin_block( REGF_FILE *file, REGF_HBIN *hbin ) { if ( !hbin->dirty ) return True; @@ -172,7 +172,7 @@ static BOOL write_hbin_block( REGF_FILE *file, REGF_HBIN *hbin ) /******************************************************************* *******************************************************************/ -static BOOL hbin_block_close( REGF_FILE *file, REGF_HBIN *hbin ) +static bool hbin_block_close( REGF_FILE *file, REGF_HBIN *hbin ) { REGF_HBIN *p; @@ -196,7 +196,7 @@ static BOOL hbin_block_close( REGF_FILE *file, REGF_HBIN *hbin ) /******************************************************************* *******************************************************************/ -static BOOL prs_regf_block( const char *desc, prs_struct *ps, int depth, REGF_FILE *file ) +static bool prs_regf_block( const char *desc, prs_struct *ps, int depth, REGF_FILE *file ) { prs_debug(ps, depth, desc, "prs_regf_block"); depth++; @@ -256,7 +256,7 @@ static BOOL prs_regf_block( const char *desc, prs_struct *ps, int depth, REGF_FI /******************************************************************* *******************************************************************/ -static BOOL prs_hbin_block( const char *desc, prs_struct *ps, int depth, REGF_HBIN *hbin ) +static bool prs_hbin_block( const char *desc, prs_struct *ps, int depth, REGF_HBIN *hbin ) { uint32 block_size2; @@ -291,7 +291,7 @@ static BOOL prs_hbin_block( const char *desc, prs_struct *ps, int depth, REGF_HB /******************************************************************* *******************************************************************/ -static BOOL prs_nk_rec( const char *desc, prs_struct *ps, int depth, REGF_NK_REC *nk ) +static bool prs_nk_rec( const char *desc, prs_struct *ps, int depth, REGF_NK_REC *nk ) { uint16 class_length, name_length; uint32 start; @@ -418,7 +418,7 @@ static uint32 regf_block_checksum( prs_struct *ps ) /******************************************************************* *******************************************************************/ -static BOOL read_regf_block( REGF_FILE *file ) +static bool read_regf_block( REGF_FILE *file ) { prs_struct ps; uint32 checksum; @@ -539,7 +539,7 @@ static REGF_HBIN* read_hbin_block( REGF_FILE *file, off_t offset ) block for it *******************************************************************/ -static BOOL hbin_contains_offset( REGF_HBIN *hbin, uint32 offset ) +static bool hbin_contains_offset( REGF_HBIN *hbin, uint32 offset ) { if ( !hbin ) return False; @@ -594,7 +594,7 @@ static REGF_HBIN* lookup_hbin_block( REGF_FILE *file, uint32 offset ) /******************************************************************* *******************************************************************/ -static BOOL prs_hash_rec( const char *desc, prs_struct *ps, int depth, REGF_HASH_REC *hash ) +static bool prs_hash_rec( const char *desc, prs_struct *ps, int depth, REGF_HASH_REC *hash ) { prs_debug(ps, depth, desc, "prs_hash_rec"); depth++; @@ -610,7 +610,7 @@ static BOOL prs_hash_rec( const char *desc, prs_struct *ps, int depth, REGF_HASH /******************************************************************* *******************************************************************/ -static BOOL hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk ) +static bool hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk ) { int i; REGF_LF_REC *lf = &nk->subkeys; @@ -674,7 +674,7 @@ static BOOL hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, R /******************************************************************* *******************************************************************/ -static BOOL hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_SK_REC *sk ) +static bool hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_SK_REC *sk ) { prs_struct *ps = &hbin->ps; uint16 tag = 0xFFFF; @@ -729,7 +729,7 @@ static BOOL hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_ /******************************************************************* *******************************************************************/ -static BOOL hbin_prs_vk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_VK_REC *vk, REGF_FILE *file ) +static bool hbin_prs_vk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_VK_REC *vk, REGF_FILE *file ) { uint32 offset; uint16 name_length; @@ -785,7 +785,7 @@ static BOOL hbin_prs_vk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_ /* get the data if necessary */ if ( vk->data_size != 0 ) { - BOOL charmode = False; + bool charmode = False; if ( (vk->type == REG_SZ) || (vk->type == REG_MULTI_SZ) ) charmode = True; @@ -846,7 +846,7 @@ static BOOL hbin_prs_vk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_ in the prs_struct *ps. *******************************************************************/ -static BOOL hbin_prs_vk_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk, REGF_FILE *file ) +static bool hbin_prs_vk_records( const char *desc, REGF_HBIN *hbin, int depth, REGF_NK_REC *nk, REGF_FILE *file ) { int i; uint32 record_size; @@ -945,7 +945,7 @@ static REGF_SK_REC* find_sk_record_by_sec_desc( REGF_FILE *file, SEC_DESC *sd ) /******************************************************************* *******************************************************************/ -static BOOL hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk ) +static bool hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk ) { int depth = 0; REGF_HBIN *sub_hbin; @@ -1024,12 +1024,12 @@ static BOOL hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk ) /******************************************************************* *******************************************************************/ -static BOOL next_record( REGF_HBIN *hbin, const char *hdr, BOOL *eob ) +static bool next_record( REGF_HBIN *hbin, const char *hdr, bool *eob ) { uint8 header[REC_HDR_SIZE]; uint32 record_size; uint32 curr_off, block_size; - BOOL found = False; + bool found = False; prs_struct *ps = &hbin->ps; curr_off = prs_offset( ps ); @@ -1087,7 +1087,7 @@ static BOOL next_record( REGF_HBIN *hbin, const char *hdr, BOOL *eob ) /******************************************************************* *******************************************************************/ -static BOOL next_nk_record( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk, BOOL *eob ) +static bool next_nk_record( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk, bool *eob ) { if ( next_record( hbin, "nk", eob ) && hbin_prs_key( file, hbin, nk ) ) return True; @@ -1100,10 +1100,10 @@ static BOOL next_nk_record( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk, B block header to disk *******************************************************************/ -static BOOL init_regf_block( REGF_FILE *file ) +static bool init_regf_block( REGF_FILE *file ) { prs_struct ps; - BOOL result = True; + bool result = True; if ( !prs_init( &ps, REGF_BLOCKSIZE, file->mem_ctx, MARSHALL ) ) return False; @@ -1310,8 +1310,8 @@ REGF_NK_REC* regfio_rootkey( REGF_FILE *file ) REGF_NK_REC *nk; REGF_HBIN *hbin; uint32 offset = REGF_BLOCKSIZE; - BOOL found = False; - BOOL eob; + bool found = False; + bool eob; if ( !file ) return NULL; @@ -1457,7 +1457,7 @@ static REGF_HBIN* find_free_space( REGF_FILE *file, uint32 size ) { REGF_HBIN *hbin, *p_hbin; uint32 block_off; - BOOL cached; + bool cached; /* check open block list */ @@ -1636,7 +1636,7 @@ static uint32 nk_record_data_size( REGF_NK_REC *nk ) /******************************************************************* *******************************************************************/ -static BOOL create_vk_record( REGF_FILE *file, REGF_VK_REC *vk, REGISTRY_VALUE *value ) +static bool create_vk_record( REGF_FILE *file, REGF_VK_REC *vk, REGISTRY_VALUE *value ) { char *name = regval_name(value); REGF_HBIN *data_hbin; |