[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Wed Dec 6 02:44:02 UTC 2017


The branch, master has been updated
       via  9e1f792 vfs: drop casts for VFS_ADD_FSP_EXTENSION() callers
       via  c39d3fc vfs: return type via VFS_ADD_FSP_EXTENSION
      from  75a8709 WHATSNEW: Mention removed net serverid subcommands

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9e1f792b2687f7e5514007405ef2987af35349cf
Author: David Disseldorp <ddiss at samba.org>
Date:   Tue Dec 5 13:21:04 2017 +0100

    vfs: drop casts for VFS_ADD_FSP_EXTENSION() callers
    
    VFS_ADD_FSP_EXTENSION() now returns a properly typed pointer.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Wed Dec  6 03:43:48 CET 2017 on sn-devel-144

commit c39d3fcb58759884613913e05e6f606bdbdf5ec3
Author: David Disseldorp <ddiss at samba.org>
Date:   Tue Dec 5 13:16:31 2017 +0100

    vfs: return type via VFS_ADD_FSP_EXTENSION
    
    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 at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/include/vfs.h               | 2 +-
 source3/modules/vfs_cacheprime.c    | 2 +-
 source3/modules/vfs_catia.c         | 2 +-
 source3/modules/vfs_commit.c        | 2 +-
 source3/modules/vfs_fruit.c         | 4 ++--
 source3/modules/vfs_glusterfs.c     | 3 +--
 source3/modules/vfs_streams_xattr.c | 4 +---
 7 files changed, 8 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 7372440..a201749 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -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) \
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index 526a057..f06ece6 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -56,7 +56,7 @@ static bool prime_cache(
         off_t * last;
         ssize_t nread;
 
-        last = (off_t *)VFS_ADD_FSP_EXTENSION(handle, fsp, off_t, NULL);
+        last = VFS_ADD_FSP_EXTENSION(handle, fsp, off_t, NULL);
         if (!last) {
                 return False;
         }
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 4088aff..6f90c4d 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -397,7 +397,7 @@ static int catia_fetch_fsp_pre_next(TALLOC_CTX *mem_ctx,
 	}
 
 	if (!make_tmp_cache) {
-		cc = (struct catia_cache *)VFS_ADD_FSP_EXTENSION(
+		cc = VFS_ADD_FSP_EXTENSION(
 			handle, fsp, struct catia_cache, NULL);
 		if (cc == NULL) {
 			return -1;
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index 340276a..872b40b 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -202,7 +202,7 @@ static int commit_open(
                                         MODULE, "eof mode", "none");
 
         if (dthresh > 0 || !strequal(eof_mode, "none")) {
-                c = (struct commit_info *)VFS_ADD_FSP_EXTENSION(
+                c = VFS_ADD_FSP_EXTENSION(
 			handle, fsp, struct commit_info, NULL);
                 /* Process main tunables */
                 if (c) {
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 05a5d39..6a47857 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -3211,7 +3211,7 @@ static int fruit_open_meta(vfs_handle_struct *handle,
 		return -1;
 	}
 
-	fio = (struct fio *)VFS_ADD_FSP_EXTENSION(handle, fsp, struct fio, NULL);
+	fio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct fio, NULL);
 	fio->type = ADOUBLE_META;
 	fio->config = config;
 
@@ -3378,7 +3378,7 @@ static int fruit_open_rsrc(vfs_handle_struct *handle,
 		return -1;
 	}
 
-	fio = (struct fio *)VFS_ADD_FSP_EXTENSION(handle, fsp, struct fio, NULL);
+	fio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct fio, NULL);
 	fio->type = ADOUBLE_RSRC;
 	fio->config = config;
 
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 9489d9d..cffab7b 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -573,8 +573,7 @@ static int vfs_gluster_open(struct vfs_handle_struct *handle,
 	if (glfd == NULL) {
 		return -1;
 	}
-	p_tmp = (glfs_fd_t **)VFS_ADD_FSP_EXTENSION(handle, fsp,
-							  glfs_fd_t *, NULL);
+	p_tmp = VFS_ADD_FSP_EXTENSION(handle, fsp, glfs_fd_t *, NULL);
 	*p_tmp = glfd;
 	/* An arbitrary value for error reporting, so you know its us. */
 	return 13371337;
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index f75f6a1..c126a48 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -493,9 +493,7 @@ static int streams_xattr_open(vfs_handle_struct *handle,
 		}
 	}
 
-        sio = (struct stream_io *)VFS_ADD_FSP_EXTENSION(handle, fsp,
-							struct stream_io,
-							NULL);
+        sio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct stream_io, NULL);
         if (sio == NULL) {
                 errno = ENOMEM;
                 goto fail;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list