vfs: return type via VFS_ADD_FSP_EXTENSION
authorDavid Disseldorp <ddiss@samba.org>
Tue, 5 Dec 2017 12:16:31 +0000 (13:16 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 5 Dec 2017 22:43:20 +0000 (23:43 +0100)
The type is passed in as a parameter, so should be used to properly type
the returned pointer, instead of using a void *.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/include/vfs.h

index 7372440d38af1cfe9d1063a6cb5a4ffbf036a87a..a2017498d3f5f94428c7643dd888f012c84b54e1 100644 (file)
@@ -1042,7 +1042,7 @@ typedef struct vfs_statvfs_struct {
  * extenstion data.
  */
 #define VFS_ADD_FSP_EXTENSION(handle, fsp, type, destroy_fn)           \
-    vfs_add_fsp_extension_notype(handle, (fsp), sizeof(type), (destroy_fn))
+    (type *)vfs_add_fsp_extension_notype(handle, (fsp), sizeof(type), (destroy_fn))
 
 /* Return a pointer to the existing FSP extension data. */
 #define VFS_FETCH_FSP_EXTENSION(handle, fsp) \