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/lib/gencache.c | |
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/lib/gencache.c')
-rw-r--r-- | source3/lib/gencache.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index 1ee720cdfd..a50e5d01fa 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -32,7 +32,7 @@ #define BLOB_TYPE_LEN 9 static TDB_CONTEXT *cache; -static BOOL cache_readonly; +static bool cache_readonly; /** * @file gencache.c @@ -50,7 +50,7 @@ static BOOL cache_readonly; * false on failure **/ -BOOL gencache_init(void) +bool gencache_init(void) { char* cache_fname = NULL; @@ -87,7 +87,7 @@ BOOL gencache_init(void) * false on failure during cache shutdown **/ -BOOL gencache_shutdown(void) +bool gencache_shutdown(void) { int ret; /* tdb_close routine returns -1 on error */ @@ -112,7 +112,7 @@ BOOL gencache_shutdown(void) * @retval false on failure **/ -BOOL gencache_set(const char *keystr, const char *value, time_t timeout) +bool gencache_set(const char *keystr, const char *value, time_t timeout) { int ret; TDB_DATA databuf; @@ -152,7 +152,7 @@ BOOL gencache_set(const char *keystr, const char *value, time_t timeout) * @retval false in case of failure **/ -BOOL gencache_del(const char *keystr) +bool gencache_del(const char *keystr) { int ret; @@ -185,7 +185,7 @@ BOOL gencache_del(const char *keystr) * @retval False for failure **/ -BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout) +bool gencache_get(const char *keystr, char **valstr, time_t *timeout) { TDB_DATA databuf; time_t t; @@ -250,19 +250,19 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout) * * @param keystr string that represents a key of this entry * @param blob DATA_BLOB that is filled with entry's blob - * @param expired pointer to a BOOL that indicates whether the entry is expired + * @param expired pointer to a bool that indicates whether the entry is expired * * @retval true when entry is successfuly fetched * @retval False for failure **/ -BOOL gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, BOOL *expired) +bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired) { TDB_DATA databuf; time_t t; char *blob_type; unsigned char *buf = NULL; - BOOL ret = False; + bool ret = False; fstring valstr; int buflen = 0, len = 0, blob_len = 0; unsigned char *blob_buf = NULL; @@ -335,9 +335,9 @@ BOOL gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, BOOL *expired) * @retval false on failure **/ -BOOL gencache_set_data_blob(const char *keystr, DATA_BLOB *blob, time_t timeout) +bool gencache_set_data_blob(const char *keystr, DATA_BLOB *blob, time_t timeout) { - BOOL ret = False; + bool ret = False; int tdb_ret; TDB_DATA databuf; char *valstr = NULL; |