g_lock: unparse->put
authorVolker Lendecke <vl@samba.org>
Wed, 17 May 2017 14:53:14 +0000 (16:53 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 15 Jun 2017 11:19:14 +0000 (13:19 +0200)
Make it more in line with server_id_get/put

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/g_lock.c

index becc04730c0ed4544a0ea561e76c9da79e5f4ecd..d0d835cdbad2c121a58faf18ce3db788b33bdbe2 100644 (file)
@@ -141,9 +141,9 @@ static bool g_lock_get(TALLOC_CTX *mem_ctx, TDB_DATA data,
        return true;
 }
 
-static ssize_t g_lock_unparse(uint8_t *buf, size_t buflen,
-                             const struct g_lock_rec *locks,
-                             size_t num_locks)
+static ssize_t g_lock_put(uint8_t *buf, size_t buflen,
+                         const struct g_lock_rec *locks,
+                         size_t num_locks)
 {
        size_t i, len, ofs;
 
@@ -175,7 +175,7 @@ static NTSTATUS g_lock_record_store(struct db_record *rec,
        uint8_t *buf;
        NTSTATUS status;
 
-       len = g_lock_unparse(NULL, 0, locks, num_locks);
+       len = g_lock_put(NULL, 0, locks, num_locks);
        if (len == -1) {
                return NT_STATUS_BUFFER_TOO_SMALL;
        }
@@ -185,7 +185,7 @@ static NTSTATUS g_lock_record_store(struct db_record *rec,
                return NT_STATUS_NO_MEMORY;
        }
 
-       g_lock_unparse(buf, len, locks, num_locks);
+       g_lock_put(buf, len, locks, num_locks);
 
        status = dbwrap_record_store(
                rec, (TDB_DATA) { .dptr = buf, .dsize = len }, 0);