[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-1579-g4a6dadc
Volker Lendecke
vl at samba.org
Sun Jan 20 16:42:51 GMT 2008
The branch, v3-2-test has been updated
via 4a6dadc5178f4861e9c032321939db3b639734b5 (commit)
via b326f11dc39a8ce20d957aac976be0cf7108ba9d (commit)
from 9f2b5dc1865ca109e1e34c91548479ad9b26f450 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 4a6dadc5178f4861e9c032321939db3b639734b5
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jan 20 17:35:25 2008 +0100
Fix some "set but never used" warnings
commit b326f11dc39a8ce20d957aac976be0cf7108ba9d
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jan 20 17:32:19 2008 +0100
Free case_state earlier
Found by a "set but never used" warning. Thanks to talloc_tos() this was not
really a bug, but this way the code becomes much clearer.
-----------------------------------------------------------------------
Summary of changes:
source/lib/dbwrap_tdb.c | 4 +---
source/locking/brlock.c | 5 -----
source/modules/vfs_streams_xattr.c | 4 ++++
source/registry/reg_api.c | 6 ------
source/smbd/open.c | 2 ++
source/smbd/reply.c | 4 +---
6 files changed, 8 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/dbwrap_tdb.c b/source/lib/dbwrap_tdb.c
index e87ceb4..18f9495 100644
--- a/source/lib/dbwrap_tdb.c
+++ b/source/lib/dbwrap_tdb.c
@@ -91,7 +91,6 @@ static struct db_record *db_tdb_fetch_locked(struct db_context *db,
struct db_tdb_ctx *ctx = talloc_get_type_abort(db->private_data,
struct db_tdb_ctx);
struct tdb_fetch_locked_state state;
- int res;
/* Do not accidently allocate/deallocate w/o need when debug level is lower than needed */
if(DEBUGLEVEL >= 10) {
@@ -110,8 +109,7 @@ static struct db_record *db_tdb_fetch_locked(struct db_context *db,
state.mem_ctx = mem_ctx;
state.result = NULL;
- res = tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetchlock_parse,
- &state);
+ tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetchlock_parse, &state);
if (state.result == NULL) {
db_tdb_fetchlock_parse(key, tdb_null, &state);
diff --git a/source/locking/brlock.c b/source/locking/brlock.c
index 4191871..341d00f 100644
--- a/source/locking/brlock.c
+++ b/source/locking/brlock.c
@@ -1539,11 +1539,6 @@ int brl_forall(void (*fn)(struct file_id id, struct server_id pid,
static int byte_range_lock_destructor(struct byte_range_lock *br_lck)
{
- TDB_DATA key;
-
- key.dptr = (uint8 *)&br_lck->key;
- key.dsize = sizeof(struct file_id);
-
if (br_lck->read_only) {
SMB_ASSERT(!br_lck->modified);
}
diff --git a/source/modules/vfs_streams_xattr.c b/source/modules/vfs_streams_xattr.c
index 87bcf22..7ce90ab 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -618,6 +618,10 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle,
TALLOC_FREE(ea.value.data);
+ if (ret == -1) {
+ return -1;
+ }
+
return n;
}
diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c
index 788af28..9c40093 100644
--- a/source/registry/reg_api.c
+++ b/source/registry/reg_api.c
@@ -453,7 +453,6 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
TALLOC_CTX *mem_ctx;
char *path, *end;
WERROR err;
- REGSUBKEY_CTR *subkeys;
if (!(mem_ctx = talloc_new(ctx))) return WERR_NOMEM;
@@ -517,11 +516,6 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
* Actually create the subkey
*/
- if (!(subkeys = TALLOC_ZERO_P(mem_ctx, REGSUBKEY_CTR))) {
- err = WERR_NOMEM;
- goto done;
- }
-
err = fill_subkey_cache(create_parent);
if (!W_ERROR_IS_OK(err)) goto done;
diff --git a/source/smbd/open.c b/source/smbd/open.c
index f557286..9fca38e 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -3080,6 +3080,8 @@ NTSTATUS create_file(connection_struct *conn,
fname = converted_fname;
}
+ TALLOC_FREE(case_state);
+
/* All file access must go through check_name() */
status = check_name(conn, fname);
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 5a5eb1e..4ea81a3 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -3375,7 +3375,6 @@ void error_to_writebrawerr(struct smb_request *req)
void reply_writebraw(struct smb_request *req)
{
connection_struct *conn = req->conn;
- int outsize = 0;
char *buf = NULL;
ssize_t nwritten=0;
ssize_t total_written=0;
@@ -3485,8 +3484,7 @@ void reply_writebraw(struct smb_request *req)
* it to send more bytes */
memcpy(buf, req->inbuf, smb_size);
- outsize = srv_set_message(buf,
- Protocol>PROTOCOL_COREPLUS?1:0,0,True);
+ srv_set_message(buf,Protocol>PROTOCOL_COREPLUS?1:0,0,True);
SCVAL(buf,smb_com,SMBwritebraw);
SSVALS(buf,smb_vwv0,0xFFFF);
show_msg(buf);
--
Samba Shared Repository
More information about the samba-cvs
mailing list