[PATCH] Two small cleanups
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Jun 26 08:36:19 MDT 2015
Hi!
Review&push appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From c742ddd52bcf0e2a80d9f66bb095c93ff9515450 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 26 Jun 2015 16:15:18 +0200
Subject: [PATCH 1/2] libsmb: Streamline smb1cli_trans a bit
Signed-off-by: Volker Lendecke <vl at samba.org>
---
libcli/smb/smb1cli_trans.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libcli/smb/smb1cli_trans.c b/libcli/smb/smb1cli_trans.c
index 59888ba..c305463 100644
--- a/libcli/smb/smb1cli_trans.c
+++ b/libcli/smb/smb1cli_trans.c
@@ -864,7 +864,7 @@ NTSTATUS smb1cli_trans(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn,
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
struct tevent_req *req;
- NTSTATUS status = NT_STATUS_OK;
+ NTSTATUS status = NT_STATUS_NO_MEMORY;
if (smbXcli_conn_has_async_calls(conn)) {
/*
@@ -876,7 +876,6 @@ NTSTATUS smb1cli_trans(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn,
ev = samba_tevent_context_init(frame);
if (ev == NULL) {
- status = NT_STATUS_NO_MEMORY;
goto fail;
}
@@ -890,7 +889,6 @@ NTSTATUS smb1cli_trans(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn,
param, num_param, max_param,
data, num_data, max_data);
if (req == NULL) {
- status = NT_STATUS_NO_MEMORY;
goto fail;
}
--
1.7.9.5
From b5373076b1a2b5ab87407b7d33abc32f8b6f4d0a Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 26 Jun 2015 13:29:27 +0200
Subject: [PATCH 2/2] libsmb: Use fstr_sprint in convert_sid_to_string
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/libsmb/libsmb_xattr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 8c23a8f..442b45f 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -203,9 +203,8 @@ convert_sid_to_string(struct cli_state *ipc_cli,
/* Converted OK */
- slprintf(str, sizeof(fstring) - 1, "%s%s%s",
- domains[0], lp_winbind_separator(),
- names[0]);
+ fstr_sprintf(str, "%s%s%s",
+ domains[0], lp_winbind_separator(), names[0]);
TALLOC_FREE(ctx);
}
--
1.7.9.5
More information about the samba-technical
mailing list