The branch, master has been updated via e2a08e5 smbd: Remove an unused variable via ecff2b2 librpc: Fix some "ignored asprint result" warnings via 1b740e5 smbd: Fix a const warning via fc5e584 smbd: Fix a const warning via 606622c smbd: Remove unused code from 4cd0e38 lib: Remove an unused variable
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit e2a08e54dd008fceb5d8aabcf02ab4e389286f03 Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 11 21:07:26 2013 +0200 smbd: Remove an unused variable Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Wed Jun 12 01:00:44 CEST 2013 on sn-devel-104 commit ecff2b25340daf38c326c2b9431568fee53ff78e Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 11 20:53:05 2013 +0200 librpc: Fix some "ignored asprint result" warnings While there, it removes some alloc/free calls Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1b740e5033d4adf4e3412bc2be7d9d4ff77ae271 Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 11 20:37:11 2013 +0200 smbd: Fix a const warning Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit fc5e584536ad0c695b414698351e171dfae85fc6 Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 11 20:35:55 2013 +0200 smbd: Fix a const warning Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 606622c10186d6197860c9b20385d9d84840da58 Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 11 20:34:00 2013 +0200 smbd: Remove unused code Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: librpc/ndr/ndr_orpc.c | 27 +++++++++------------------ source3/smbd/close.c | 7 ------- source3/smbd/dir.c | 2 -- source3/smbd/process.c | 4 ++-- 4 files changed, 11 insertions(+), 29 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/ndr/ndr_orpc.c b/librpc/ndr/ndr_orpc.c index 6a55048..936a56b 100644 --- a/librpc/ndr/ndr_orpc.c +++ b/librpc/ndr/ndr_orpc.c @@ -93,23 +93,17 @@ void ndr_print_DUALSTRINGARRAY(struct ndr_print *ndr, const char *name, const st ndr->print(ndr, "STRING BINDINGS"); ndr->depth++; for (i=0;ar->stringbindings[i];i++) { - char *idx = NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); - free(idx); - } + char idx[13]; /* 2^32 has 10 digits */ + snprintf(idx, sizeof(idx), "[%d]", i); + ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); } ndr->depth--; ndr->print(ndr, "SECURITY BINDINGS"); ndr->depth++; for (i=0;ar->securitybindings[i];i++) { - char *idx = NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_SECURITYBINDING(ndr, idx, ar->securitybindings[i]); - free(idx); - } + char idx[13]; /* 2^32 has 10 digits */ + snprintf(idx, sizeof(idx), "[%d]", i); + ndr_print_SECURITYBINDING(ndr, idx, ar->securitybindings[i]); } ndr->depth--; } @@ -162,12 +156,9 @@ void ndr_print_STRINGARRAY(struct ndr_print *ndr, const char *name, const struct ndr->print(ndr, "%-25s: STRINGARRAY", name); ndr->depth++; for (i=0;ar->stringbindings[i];i++) { - char *idx = NULL; - asprintf(&idx, "[%d]", i); - if (idx) { - ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); - free(idx); - } + char idx[13]; /* 2^32 has 10 digits */ + snprintf(idx, sizeof(idx), "[%d]", i); + ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]); } ndr->depth--; } diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 94ec789..64faf98 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -157,13 +157,6 @@ static NTSTATUS close_filestruct(files_struct *fsp) return status; } -static int compare_share_mode_times(const void *p1, const void *p2) -{ - const struct share_mode_entry *s1 = (const struct share_mode_entry *)p1; - const struct share_mode_entry *s2 = (const struct share_mode_entry *)p2; - return timeval_compare(&s1->time, &s2->time); -} - /**************************************************************************** Delete all streams ****************************************************************************/ diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 7dd959f..d99eec2 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -426,7 +426,6 @@ static struct smb_Dir *open_dir_with_privilege(connection_struct *conn, const char *wcard, uint32_t attr) { - NTSTATUS status; struct smb_Dir *dir_hnd = NULL; struct smb_filename *smb_fname_cwd; char *saved_dir = vfs_GetWd(talloc_tos(), conn); @@ -445,7 +444,6 @@ static struct smb_Dir *open_dir_with_privilege(connection_struct *conn, smb_fname_cwd = synthetic_smb_fname(talloc_tos(), ".", NULL, NULL); if (smb_fname_cwd == NULL) { - status = NT_STATUS_NO_MEMORY; goto out; } ret = SMB_VFS_STAT(conn, smb_fname_cwd); diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 105efc2..5ef0fd3 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1701,7 +1701,7 @@ void smb_request_done(struct smb_request *req) req->conn = NULL; } next->chain_fsp = req->chain_fsp; - next->inbuf = (uint8_t *)req->inbuf; + next->inbuf = req->inbuf; req = next; req->conn = switch_message(req->cmd, req); @@ -2133,7 +2133,7 @@ bool smb1_walk_chain(const uint8_t *buf, wct = CVAL(buf, smb_wct); vwv = (const uint16_t *)(buf + smb_vwv); num_bytes = smb_buflen(buf); - bytes = (uint8_t *)smb_buf_const(buf); + bytes = (const uint8_t *)smb_buf_const(buf); if (!fn(cmd, wct, vwv, num_bytes, bytes, private_data)) { return false; -- Samba Shared Repository