tdb2: rename set_header to the more appropriate set_used_header.
[ccan] / ccan / tdb2 / free.c
index 8f81f9d99aae0a378db0163e6cd389bda336d060..6fd82c5c540d0ee2767d60385c43654606396c8b 100644 (file)
@@ -418,9 +418,9 @@ again:
                assert(keylen + datalen + leftover <= best.data_len);
                /* We need to mark non-free before we drop lock, otherwise
                 * coalesce() could try to merge it! */
-               if (set_header(tdb, &rec, keylen, datalen,
-                              best.data_len - leftover,
-                              hashlow) != 0)
+               if (set_used_header(tdb, &rec, keylen, datalen,
+                                   best.data_len - leftover,
+                                   hashlow) != 0)
                        goto unlock_err;
 
                if (tdb_write_convert(tdb, best_off, &rec, sizeof(rec)) != 0)
@@ -493,10 +493,10 @@ static tdb_off_t get_free(struct tdb_context *tdb,
        return 0;
 }
 
-int set_header(struct tdb_context *tdb,
-              struct tdb_used_record *rec,
-              uint64_t keylen, uint64_t datalen,
-              uint64_t actuallen, unsigned hashlow)
+int set_used_header(struct tdb_context *tdb,
+                   struct tdb_used_record *rec,
+                   uint64_t keylen, uint64_t datalen,
+                   uint64_t actuallen, unsigned hashlow)
 {
        uint64_t keybits = (fls64(keylen) + 1) / 2;