summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-07 12:13:26 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:08 +0200
commit8d4a8389bb2df77ff8923dda8368aa2915652c1a (patch)
treeaba02d7ca688a18a9ecfa2beccfe4e1b8d464c72 /source3/locking
parent5e26e94092b56ee47e7ec7837f7cd0feb3fb0119 (diff)
downloadsamba-8d4a8389bb2df77ff8923dda8368aa2915652c1a.tar.gz
samba-8d4a8389bb2df77ff8923dda8368aa2915652c1a.tar.bz2
samba-8d4a8389bb2df77ff8923dda8368aa2915652c1a.zip
s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()
Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c2
-rw-r--r--source3/locking/locking.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index f82d873364..52e23ec003 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1521,7 +1521,7 @@ void brl_close_fnum(struct messaging_context *msg_ctx,
/* Copy the current lock array. */
if (br_lck->num_locks) {
- locks_copy = (struct lock_struct *)TALLOC_MEMDUP(br_lck, locks, br_lck->num_locks * sizeof(struct lock_struct));
+ locks_copy = (struct lock_struct *)talloc_memdup(br_lck, locks, br_lck->num_locks * sizeof(struct lock_struct));
if (!locks_copy) {
smb_panic("brl_close_fnum: talloc failed");
}
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 91dff565d3..e0a3b93ce7 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -682,7 +682,7 @@ static bool parse_share_modes(const TDB_DATA dbuf, struct share_mode_lock *lck)
}
lck->share_modes = (struct share_mode_entry *)
- TALLOC_MEMDUP(lck,
+ talloc_memdup(lck,
dbuf.dptr+sizeof(struct locking_data),
lck->num_share_modes *
sizeof(struct share_mode_entry));