diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-03-28 13:08:27 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-05 02:39:09 +0200 |
commit | 3e8a6e576007892bab7d59367c5199a41fb1506d (patch) | |
tree | 297451b0b939f545185dea56f40ca28315ac90d5 | |
parent | ecc822faf8f1e2f34573aabef381a846b08afeec (diff) | |
download | samba-3e8a6e576007892bab7d59367c5199a41fb1506d.tar.gz samba-3e8a6e576007892bab7d59367c5199a41fb1506d.tar.bz2 samba-3e8a6e576007892bab7d59367c5199a41fb1506d.zip |
build: Remove sys_closedir wrapper
-rw-r--r-- | libgpo/gpext/gpext.c | 6 | ||||
-rw-r--r-- | source3/client/client.c | 6 | ||||
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/system.c | 10 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_netatalk.c | 2 | ||||
-rw-r--r-- | source3/param/loadparm.c | 6 | ||||
-rw-r--r-- | source3/rpc_server/samr/srv_samr_chgpasswd.c | 4 | ||||
-rw-r--r-- | source3/utils/net_usershare.c | 14 |
9 files changed, 20 insertions, 31 deletions
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c index 6177bdc710..6b23450987 100644 --- a/libgpo/gpext/gpext.c +++ b/libgpo/gpext/gpext.c @@ -508,7 +508,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx, p = strrchr(dirent->d_name, '.'); if (!p) { - sys_closedir(dir); + closedir(dir); return NT_STATUS_NO_MEMORY; } @@ -523,12 +523,12 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx, if (!add_string_to_array(mem_ctx, name, ext_list, (int *)ext_list_len)) { - sys_closedir(dir); + closedir(dir); return NT_STATUS_NO_MEMORY; } } - sys_closedir(dir); + closedir(dir); return NT_STATUS_OK; } diff --git a/source3/client/client.c b/source3/client/client.c index 0fb3e3ff2f..40ba23ef40 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2111,14 +2111,14 @@ static int file_find(struct file_list **list, const char *directory, if (ret == -1) { SAFE_FREE(path); - sys_closedir(dir); + closedir(dir); return -1; } } entry = SMB_MALLOC_P(struct file_list); if (!entry) { d_printf("Out of memory in file_find\n"); - sys_closedir(dir); + closedir(dir); return -1; } entry->file_path = path; @@ -2129,7 +2129,7 @@ static int file_find(struct file_list **list, const char *directory, } } - sys_closedir(dir); + closedir(dir); return 0; } diff --git a/source3/include/proto.h b/source3/include/proto.h index 1d400efdff..37ae272e75 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -339,7 +339,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF void kernel_flock(int fd, uint32 share_mode, uint32 access_mask); SMB_STRUCT_DIR *sys_fdopendir(int fd); void sys_rewinddir(SMB_STRUCT_DIR *dirp); -int sys_closedir(SMB_STRUCT_DIR *dirp); int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); int sys_waitpid(pid_t pid,int *status,int options); char *sys_getwd(void); diff --git a/source3/lib/system.c b/source3/lib/system.c index d650862a39..a414c92d27 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -642,16 +642,6 @@ void sys_rewinddir(SMB_STRUCT_DIR *dirp) rewinddir(dirp); } -/******************************************************************* - A close wrapper. -********************************************************************/ - -int sys_closedir(SMB_STRUCT_DIR *dirp) -{ - return closedir(dirp); -} - -/******************************************************************* An mknod() wrapper. ********************************************************************/ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index d7a85beff9..965c6a26b8 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -455,7 +455,7 @@ static int vfswrap_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp) int result; START_PROFILE(syscall_closedir); - result = sys_closedir(dirp); + result = closedir(dirp); END_PROFILE(syscall_closedir); return result; } diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c index 6a74b3b1a1..4e5df48ac8 100644 --- a/source3/modules/vfs_netatalk.c +++ b/source3/modules/vfs_netatalk.c @@ -170,7 +170,7 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path) atalk_unlink_file(dpath); } - sys_closedir(dir); + closedir(dir); } /* Disk operations */ diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 4fd09260c6..86ea4a433f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -8402,11 +8402,11 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx, if (sys_stat(sharepath, &sbuf, false) == -1) { DEBUG(2,("parse_usershare_file: share %s : stat failed on path %s. %s\n", servicename, sharepath, strerror(errno) )); - sys_closedir(dp); + closedir(dp); return USERSHARE_POSIX_ERR; } - sys_closedir(dp); + closedir(dp); if (!S_ISDIR(sbuf.st_ex_mode)) { DEBUG(2,("parse_usershare_file: share %s path %s is not a directory.\n", @@ -8862,7 +8862,7 @@ int load_usershare_shares(struct smbd_server_connection *sconn, } } - sys_closedir(dp); + closedir(dp); /* Sweep through and delete any non-refreshed usershares that are not currently in use. */ diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c index 795471b580..a88f61437f 100644 --- a/source3/rpc_server/samr/srv_samr_chgpasswd.c +++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c @@ -118,12 +118,12 @@ static int findpty(char **slave) DEBUG(3, ("pty: opened %s\n", line)); line[5] = 't'; *slave = line; - sys_closedir(dirp); + closedir(dirp); return (master); } } } - sys_closedir(dirp); + closedir(dirp); SAFE_FREE(line); return (-1); } diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c index c22c50fcdd..e9490d1fb9 100644 --- a/source3/utils/net_usershare.c +++ b/source3/utils/net_usershare.c @@ -249,7 +249,7 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) basepath, n); if (!path) { - sys_closedir(dp); + closedir(dp); return -1; } @@ -280,19 +280,19 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) /* (Finally) - add to list. */ fl = talloc(ctx, struct file_list); if (!fl) { - sys_closedir(dp); + closedir(dp); return -1; } fl->pathname = talloc_strdup(ctx, n); if (!fl->pathname) { - sys_closedir(dp); + closedir(dp); return -1; } DLIST_ADD(flist, fl); } - sys_closedir(dp); + closedir(dp); return 0; } @@ -588,7 +588,7 @@ static int count_num_usershares(void) basepath, n); if (!path) { - sys_closedir(dp); + closedir(dp); return -1; } @@ -610,7 +610,7 @@ static int count_num_usershares(void) num_usershares++; } - sys_closedir(dp); + closedir(dp); return num_usershares; } @@ -1123,7 +1123,7 @@ int net_usershare(struct net_context *c, int argc, const char **argv) } return -1; } - sys_closedir(dp); + closedir(dp); return net_run_function(c, argc, argv, "net usershare", func); } |