diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-05-24 07:34:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:32 -0500 |
commit | 971d30bb201f5c3faff5f575d26882eb79f7955a (patch) | |
tree | aad4df492eb9c8bf1e105c8bac65dc315b27a1cd /source4/ntvfs/posix | |
parent | cdc64c448df49676c96f87d106af8de0c467651f (diff) | |
download | samba-971d30bb201f5c3faff5f575d26882eb79f7955a.tar.gz samba-971d30bb201f5c3faff5f575d26882eb79f7955a.tar.bz2 samba-971d30bb201f5c3faff5f575d26882eb79f7955a.zip |
r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617589ac6df4f527877241464cacbf8b3)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_dirlist.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_notify.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 17 |
3 files changed, 7 insertions, 16 deletions
diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c index 517f5b68d0..c351f6ba41 100644 --- a/source4/ntvfs/posix/pvfs_dirlist.c +++ b/source4/ntvfs/posix/pvfs_dirlist.c @@ -84,9 +84,8 @@ static NTSTATUS pvfs_list_no_wildcard(struct pvfs_state *pvfs, struct pvfs_filen /* destroy an open search */ -static int pvfs_dirlist_destructor(void *ptr) +static int pvfs_dirlist_destructor(struct pvfs_dir *dir) { - struct pvfs_dir *dir = ptr; if (dir->dir) closedir(dir->dir); return 0; } diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c index bd1e1b9d89..64aeac0696 100644 --- a/source4/ntvfs/posix/pvfs_notify.c +++ b/source4/ntvfs/posix/pvfs_notify.c @@ -117,9 +117,8 @@ static void pvfs_notify_send(struct pvfs_notify_buffer *notify_buffer, /* destroy a notify buffer. Called when the handle is closed */ -static int pvfs_notify_destructor(void *ptr) +static int pvfs_notify_destructor(struct pvfs_notify_buffer *n) { - struct pvfs_notify_buffer *n = talloc_get_type(ptr, struct pvfs_notify_buffer); notify_remove(n->f->pvfs->notify_context, n); n->f->notify_buffer = NULL; pvfs_notify_send(n, NT_STATUS_OK, True); diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 2102de29f5..74f9b44c5c 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -54,9 +54,8 @@ struct pvfs_file *pvfs_find_fd(struct pvfs_state *pvfs, /* cleanup a open directory handle */ -static int pvfs_dir_handle_destructor(void *p) +static int pvfs_dir_handle_destructor(struct pvfs_file_handle *h) { - struct pvfs_file_handle *h = p; int open_count; char *path = NULL; @@ -102,10 +101,8 @@ static int pvfs_dir_handle_destructor(void *p) /* cleanup a open directory fnum */ -static int pvfs_dir_fnum_destructor(void *p) +static int pvfs_dir_fnum_destructor(struct pvfs_file *f) { - struct pvfs_file *f = p; - DLIST_REMOVE(f->pvfs->files.list, f); ntvfs_handle_remove_backend_data(f->ntvfs, f->pvfs->ntvfs); @@ -412,9 +409,8 @@ cleanup_delete: /* destroy a struct pvfs_file_handle */ -static int pvfs_handle_destructor(void *p) +static int pvfs_handle_destructor(struct pvfs_file_handle *h) { - struct pvfs_file_handle *h = p; int open_count; char *path = NULL; @@ -494,10 +490,8 @@ static int pvfs_handle_destructor(void *p) /* destroy a struct pvfs_file */ -static int pvfs_fnum_destructor(void *p) +static int pvfs_fnum_destructor(struct pvfs_file *f) { - struct pvfs_file *f = talloc_get_type(p, struct pvfs_file); - DLIST_REMOVE(f->pvfs->files.list, f); pvfs_lock_close(f->pvfs, f); ntvfs_handle_remove_backend_data(f->ntvfs, f->pvfs->ntvfs); @@ -768,9 +762,8 @@ struct pvfs_open_retry { }; /* destroy a pending open request */ -static int pvfs_retry_destructor(void *ptr) +static int pvfs_retry_destructor(struct pvfs_open_retry *r) { - struct pvfs_open_retry *r = ptr; struct pvfs_state *pvfs = r->ntvfs->private_data; if (r->odb_locking_key.data) { struct odb_lock *lck; |