ctdb: Remove unused ctdb_ltdb_fetch_with_header()
authorVolker Lendecke <vl@samba.org>
Mon, 20 May 2019 13:12:56 +0000 (15:12 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 23 May 2019 18:08:36 +0000 (18:08 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 23 18:08:36 UTC 2019 on sn-devel-184

ctdb/common/common.h
ctdb/common/ctdb_ltdb.c

index 02bb746c9b34ce23b17ebd44633d1c0d9e04f5ca..6b2c98ef383e28841ca8fb4f19cbf4ac98d3ed5d 100644 (file)
@@ -61,10 +61,6 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
                    TDB_DATA key, struct ctdb_ltdb_header *header,
                    TALLOC_CTX *mem_ctx, TDB_DATA *data);
 
-int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db,
-                               TDB_DATA key, struct ctdb_ltdb_header *header,
-                               TALLOC_CTX *mem_ctx, TDB_DATA *data);
-
 int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key,
                    struct ctdb_ltdb_header *header, TDB_DATA data);
 
index f4f216e1ee365d30962891e681985164e3570347..de4f44895e4c3dca8eeed4ef6b2b01c1e88802cd 100644 (file)
@@ -221,41 +221,6 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
        return 0;
 }
 
-/*
-  fetch a record from the ltdb, separating out the header information
-  and returning the body of the record.
-  if the record does not exist, *header will be NULL
-  and data = {0, NULL}
-*/
-int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db, 
-                   TDB_DATA key, struct ctdb_ltdb_header *header, 
-                   TALLOC_CTX *mem_ctx, TDB_DATA *data)
-{
-       TDB_DATA rec;
-
-       rec = tdb_fetch(ctdb_db->ltdb->tdb, key);
-       if (rec.dsize < sizeof(*header)) {
-               free(rec.dptr);
-
-               data->dsize = 0;
-               data->dptr = NULL;
-               return -1;
-       }
-
-       *header = *(struct ctdb_ltdb_header *)rec.dptr;
-       if (data) {
-               data->dsize = rec.dsize - sizeof(struct ctdb_ltdb_header);
-               data->dptr = talloc_memdup(mem_ctx, 
-                                          sizeof(struct ctdb_ltdb_header)+rec.dptr,
-                                          data->dsize);
-       }
-
-       free(rec.dptr);
-
-       return 0;
-}
-
-
 /*
   write a record to a normal database
 */