diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index e715633c411..115666986c3 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -141,53 +141,6 @@ static NTSTATUS g_lock_store(struct db_record *rec, struct g_lock *lck, return dbwrap_record_storev(rec, dbufs, ARRAY_SIZE(dbufs), 0); } -#if 0 - -static ssize_t g_lock_put(uint8_t *buf, size_t buflen, - const struct g_lock_rec *locks, - size_t num_locks, - const uint8_t *data, size_t datalen) -{ - size_t i, len, ofs; - - if (num_locks > UINT32_MAX/G_LOCK_REC_LENGTH) { - return -1; - } - - len = num_locks * G_LOCK_REC_LENGTH; - - len += sizeof(uint32_t); - if (len < sizeof(uint32_t)) { - return -1; - } - - len += datalen; - if (len < datalen) { - return -1; - } - - if (len > buflen) { - return len; - } - - ofs = 0; - SIVAL(buf, ofs, num_locks); - ofs += sizeof(uint32_t); - - for (i=0; i