[PATCH] Two small cosmetic patches

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Aug 5 08:36:29 MDT 2014


Hi!

Review&push would be 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 2b898a2d6a6205b4ccf630ea24387b5787650440 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sun, 3 Aug 2014 11:51:40 +0200
Subject: [PATCH 1/2] locking: Avoid a pointless cast

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/locking/posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 9ee59be..4189a2d 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -114,7 +114,7 @@ static bool posix_lock_in_range(off_t *offset_out, off_t *count_out,
 	 * any Win32 locks of length zero. JRA.
 	 */
 
-	if (count == (off_t)0) {
+	if (count == 0) {
 		DEBUG(10,("posix_lock_in_range: count = 0, ignoring.\n"));
 		return False;
 	}
-- 
1.8.1.2


From ffb873b743c86eddc91ba07da6d3a531f434594e Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sun, 3 Aug 2014 16:28:50 +0200
Subject: [PATCH 2/2] locking: posix_lock_list does not use "fsp"

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/locking/posix.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 4189a2d..a0966ab 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -686,7 +686,6 @@ struct lock_list {
 static struct lock_list *posix_lock_list(TALLOC_CTX *ctx,
 						struct lock_list *lhead,
 						const struct lock_context *lock_ctx, /* Lock context lhead belongs to. */
-						files_struct *fsp,
 						const struct lock_struct *plocks,
 						int num_locks)
 {
@@ -1004,7 +1003,6 @@ bool set_posix_lock_windows_flavour(files_struct *fsp,
 	llist = posix_lock_list(l_ctx,
 				llist,
 				lock_ctx, /* Lock context llist belongs to. */
-				fsp,
 				plocks,
 				num_locks);
 
@@ -1133,7 +1131,6 @@ bool release_posix_lock_windows_flavour(files_struct *fsp,
 	ulist = posix_lock_list(ul_ctx,
 				ulist,
 				lock_ctx, /* Lock context ulist belongs to. */
-				fsp,
 				plocks,
 				num_locks);
 
@@ -1293,7 +1290,6 @@ bool release_posix_lock_posix_flavour(files_struct *fsp,
 	ulist = posix_lock_list(ul_ctx,
 				ulist,
 				lock_ctx, /* Lock context ulist belongs to. */
-				fsp,
 				plocks,
 				num_locks);
 
-- 
1.8.1.2



More information about the samba-technical mailing list