gencache: True->true, False->false
authorVolker Lendecke <vl@samba.org>
Sun, 13 Dec 2015 14:17:27 +0000 (15:17 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 14 Dec 2015 19:23:13 +0000 (20:23 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/gencache.c

index 90eafaa7be2d221069e1e0b4861fbef10922ffef..ed78476a6e5993de0934b9ea859e3faca2e93325 100644 (file)
@@ -63,7 +63,9 @@ static bool gencache_init(void)
        int open_flags = O_RDWR|O_CREAT;
 
        /* skip file open if it's already opened */
-       if (cache) return True;
+       if (cache) {
+               return true;
+       }
 
        cache_fname = cache_path("gencache.tdb");
        if (cache_fname == NULL) {
@@ -112,7 +114,7 @@ static bool gencache_init(void)
 
        if (!cache) {
                DEBUG(5, ("Attempt to open gencache.tdb has failed.\n"));
-               return False;
+               return false;
        }
 
        cache_fname = lock_path("gencache_notrans.tdb");
@@ -139,7 +141,7 @@ static bool gencache_init(void)
        }
        TALLOC_FREE(cache_fname);
 
-       return True;
+       return true;
 }
 
 static TDB_DATA last_stabilize_key(void)
@@ -295,7 +297,9 @@ bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob,
                return false;
        }
 
-       if (!gencache_init()) return False;
+       if (!gencache_init()) {
+               return false;
+       }
 
        if (gencache_have_val(keystr, blob, timeout)) {
                DEBUG(10, ("Did not store value for %s, we already got it\n",
@@ -305,7 +309,7 @@ bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob,
 
        val = talloc_asprintf(talloc_tos(), CACHE_DATA_FMT, (int)timeout);
        if (val == NULL) {
-               return False;
+               return false;
        }
        val = talloc_realloc(NULL, val, char, talloc_array_length(val)-1);
        if (val == NULL) {
@@ -383,7 +387,9 @@ bool gencache_del(const char *keystr)
                return false;
        }
 
-       if (!gencache_init()) return False;     
+       if (!gencache_init()) {
+               return false;
+       }
 
        DEBUG(10, ("Deleting cache entry (key=[%s])\n", keystr));
 
@@ -569,7 +575,7 @@ static void gencache_get_data_blob_parser(time_t timeout, DATA_BLOB blob,
  *        timeout
  *
  * @retval true when entry is successfuly fetched
- * @retval False for failure
+ * @retval false for failure
  **/
 
 bool gencache_get_data_blob(const char *keystr, TALLOC_CTX *mem_ctx,
@@ -604,7 +610,7 @@ bool gencache_get_data_blob(const char *keystr, TALLOC_CTX *mem_ctx,
                *timeout = state.timeout;
        }
 
-       return True;
+       return true;
 
 fail:
        if (was_expired != NULL) {
@@ -793,14 +799,14 @@ static int wipe_fn(struct tdb_context *tdb, TDB_DATA key, TDB_DATA val,
  *        timeout
  *
  * @retval true when entry is successfuly fetched
- * @retval False for failure
+ * @retval false for failure
  **/
 
 bool gencache_get(const char *keystr, TALLOC_CTX *mem_ctx, char **value,
                  time_t *ptimeout)
 {
        DATA_BLOB blob;
-       bool ret = False;
+       bool ret = false;
 
        ret = gencache_get_data_blob(keystr, mem_ctx, &blob, ptimeout, NULL);
        if (!ret) {