summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-28 01:37:19 +0000
committerJeremy Allison <jra@samba.org>2005-06-28 01:37:19 +0000
commit0f39edfd03f0ab45f791703a9743131711e98260 (patch)
tree2e7e721d1adeccd81d4b8758b4cb577a42daa314
parentcc5c21a647d4c70b21298d5f0601be359de3c90c (diff)
downloadsamba-0f39edfd03f0ab45f791703a9743131711e98260.tar.gz
samba-0f39edfd03f0ab45f791703a9743131711e98260.tar.xz
samba-0f39edfd03f0ab45f791703a9743131711e98260.zip
r7975: One more tidyup to ensure we're using "struct posix_lock".
Jeremy.
-rw-r--r--source/locking/posix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/locking/posix.c b/source/locking/posix.c
index 3859896c47c..218c4410280 100644
--- a/source/locking/posix.c
+++ b/source/locking/posix.c
@@ -102,6 +102,7 @@ static BOOL add_fd_to_close_entry(files_struct *fsp)
char *tp;
dbuf.dptr = NULL;
+ dbuf.dsize = 0;
dbuf = tdb_fetch(posix_pending_close_tdb, kbuf);
@@ -330,7 +331,7 @@ static BOOL delete_posix_lock_entry_by_index(files_struct *fsp, size_t entry)
tdb_delete(posix_lock_tdb, kbuf);
} else {
if (entry < count-1) {
- memmove(&locks[entry], &locks[entry+1], sizeof(*locks)*((count-1) - entry));
+ memmove(&locks[entry], &locks[entry+1], sizeof(struct posix_lock)*((count-1) - entry));
}
dbuf.dsize -= sizeof(struct posix_lock);
tdb_store(posix_lock_tdb, kbuf, dbuf, TDB_REPLACE);