lib: Remove unused tdb_pack_append()
authorVolker Lendecke <vl@samba.org>
Tue, 25 Sep 2018 15:57:17 +0000 (08:57 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 2 Oct 2018 23:07:15 +0000 (01:07 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/util_tdb.h
source3/lib/util_tdb.c

index 111603359752b9f1a6d177ac57503ecb205aa1d2..8dc104834e853192fe9b16943b65819fae08969c 100644 (file)
@@ -38,8 +38,6 @@ int tdb_trans_delete(struct tdb_context *tdb, TDB_DATA key);
  */
 int tdb_unpack(const uint8_t *buf, int bufsize, const char *fmt, ...);
 size_t tdb_pack(uint8_t *buf, int bufsize, const char *fmt, ...);
-bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8_t **buf, size_t *len,
-                    const char *fmt, ...);
 
 struct tdb_context *tdb_open_log(const char *name, int hash_size,
                                 int tdb_flags, int open_flags, mode_t mode);
index 1e533e825346bf39cf0cfb2ec6d4f0e844346bba..80e66e0a108fbabb8754d34debf90ad0bfb37485 100644 (file)
@@ -140,40 +140,6 @@ size_t tdb_pack(uint8_t *buf, int bufsize, const char *fmt, ...)
        return result;
 }
 
-bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8_t **buf, size_t *len,
-                    const char *fmt, ...)
-{
-       va_list ap;
-       size_t len1, len2;
-
-       va_start(ap, fmt);
-       len1 = tdb_pack_va(NULL, 0, fmt, ap);
-       va_end(ap);
-
-       if (mem_ctx != NULL) {
-               *buf = talloc_realloc(mem_ctx, *buf, uint8_t,
-                                           (*len) + len1);
-       } else {
-               *buf = SMB_REALLOC_ARRAY(*buf, uint8_t, (*len) + len1);
-       }
-
-       if (*buf == NULL) {
-               return False;
-       }
-
-       va_start(ap, fmt);
-       len2 = tdb_pack_va((*buf)+(*len), len1, fmt, ap);
-       va_end(ap);
-
-       if (len1 != len2) {
-               return False;
-       }
-
-       *len += len2;
-
-       return True;
-}
-
 /****************************************************************************
  Useful pair of routines for packing/unpacking data consisting of
  integers and strings.