[PATCH] Fix trailing whitespace in new (!!!) code

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Apr 6 11:48:34 UTC 2018


Hello, Gary!

Attached find a patch that cleans up fresh code to match
README.Coding. Gary, if you review Andrew's code in the future, can
you please point him at the relevant section of README.Coding, quoted
here for your convenience?

* No Trailing Whitespace
  Use source3/script/strip_trail_ws.pl to clean up your files before
  committing.

Review appreciated!

Thanks,

Volker Lendecke

-- 
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 8939561e55ded16fa7f600b2ea68f5bb89e4211c Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 6 Apr 2018 13:42:35 +0200
Subject: [PATCH] ldb: Fix trailing whitespace

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 lib/ldb/ldb_tdb/ldb_index.c     |  8 ++++----
 lib/ldb/tests/ldb_kv_ops_test.c |  2 +-
 lib/ldb/tests/ldb_mod_op_test.c | 22 +++++++++++-----------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c
index 59434f3ba99..cd64e6965f6 100644
--- a/lib/ldb/ldb_tdb/ldb_index.c
+++ b/lib/ldb/ldb_tdb/ldb_index.c
@@ -853,7 +853,7 @@ static struct ldb_dn *ltdb_index_key(struct ldb_context *ldb,
 	const size_t min_data = 1;
 	const size_t min_key_length = additional_key_length
 		+ indx_len + num_separators + min_data;
-	
+
 	if (attr[0] == '@') {
 		attr_for_dn = attr;
 		v = *value;
@@ -907,7 +907,7 @@ static struct ldb_dn *ltdb_index_key(struct ldb_context *ldb,
 		talloc_free(attr_folded);
 		return NULL;
 	}
-	
+
 	/*
 	 * ltdb_key_dn() makes something 4 bytes longer, it adds a leading
 	 * "DN=" and a trailing string terminator
@@ -977,8 +977,8 @@ static struct ldb_dn *ltdb_index_key(struct ldb_context *ldb,
 	} else {
 		/* Only need two seperators */
 		num_separators = 2;
-		
-		/* 
+
+		/*
 		 * Overflow here is not critical as we only use this
 		 * to choose the printf truncation
 		 */
diff --git a/lib/ldb/tests/ldb_kv_ops_test.c b/lib/ldb/tests/ldb_kv_ops_test.c
index 4cfb618ea94..93acb4879fc 100644
--- a/lib/ldb/tests/ldb_kv_ops_test.c
+++ b/lib/ldb/tests/ldb_kv_ops_test.c
@@ -199,7 +199,7 @@ static int parse(struct ldb_val key,
 	read->data = talloc_size(talloc_autofree_context(),
 				 data.length);
 	assert_non_null(read->data);
-	
+
 	memcpy(read->data, data.data, data.length);
 	read->length = data.length;
 	return LDB_SUCCESS;
diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c
index c9ac832d7b1..1340f5efa23 100644
--- a/lib/ldb/tests/ldb_mod_op_test.c
+++ b/lib/ldb/tests/ldb_mod_op_test.c
@@ -1953,7 +1953,7 @@ static void test_ldb_modify_during_search(void **state, bool add_index,
 		}
 		assert_int_equal(ret, LDB_SUCCESS);
 	}
-		
+
 	tevent_loop_allow_nesting(search_test_ctx->ldb_test_ctx->ev);
 
 	ctx.basedn
@@ -3370,7 +3370,7 @@ static void test_ldb_add_duplicate_value_to_unique_index(void **state)
 
 	ret = ldb_msg_add_string(msg02, "cn", "test_unique_index");
 	assert_int_equal(ret, LDB_SUCCESS);
-	
+
 	ret = ldb_msg_add_string(msg02, "objectUUID",
 				 "0123456789abcde2");
 	assert_int_equal(ret, LDB_SUCCESS);
@@ -3421,7 +3421,7 @@ static void test_ldb_add_to_index_duplicates_allowed(void **state)
 
 	ret = ldb_msg_add_string(msg02, "objectUUID",
 				 "0123456789abcde2");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg02);
 	assert_int_equal(ret, LDB_SUCCESS);
 	talloc_free(tmp_ctx);
@@ -3453,7 +3453,7 @@ static void test_ldb_add_to_index_unique_values_required(void **state)
 
 	ret = ldb_msg_add_string(msg01, "objectUUID",
 				 "0123456789abcde1");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg01);
 	assert_int_equal(ret, LDB_SUCCESS);
 
@@ -3468,7 +3468,7 @@ static void test_ldb_add_to_index_unique_values_required(void **state)
 
 	ret = ldb_msg_add_string(msg02, "objectUUID",
 				 "0123456789abcde2");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg02);
 	assert_int_equal(ret, LDB_ERR_CONSTRAINT_VIOLATION);
 	talloc_free(tmp_ctx);
@@ -3498,7 +3498,7 @@ static void test_ldb_unique_index_duplicate_logging(void **state)
 #ifdef GUID_IDX
 	return;
 #endif
-	
+
 	ldb_set_debug(test_ctx->ldb, ldb_debug_string, &debug_string);
 	tmp_ctx = talloc_new(test_ctx);
 	assert_non_null(tmp_ctx);
@@ -3514,7 +3514,7 @@ static void test_ldb_unique_index_duplicate_logging(void **state)
 
 	ret = ldb_msg_add_string(msg01, "objectUUID",
 				 "0123456789abcde1");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg01);
 	assert_int_equal(ret, LDB_SUCCESS);
 
@@ -3529,7 +3529,7 @@ static void test_ldb_unique_index_duplicate_logging(void **state)
 
 	ret = ldb_msg_add_string(msg02, "objectUUID",
 				 "0123456789abcde2");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg02);
 	assert_int_equal(ret, LDB_ERR_CONSTRAINT_VIOLATION);
 
@@ -3558,7 +3558,7 @@ static void test_ldb_duplicate_dn_logging(void **state)
 #ifdef GUID_IDX
 	return;
 #endif
-	
+
 	ldb_set_debug(test_ctx->ldb, ldb_debug_string, &debug_string);
 	tmp_ctx = talloc_new(test_ctx);
 	assert_non_null(tmp_ctx);
@@ -3574,7 +3574,7 @@ static void test_ldb_duplicate_dn_logging(void **state)
 
 	ret = ldb_msg_add_string(msg01, "objectUUID",
 				 "0123456789abcde1");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg01);
 	assert_int_equal(ret, LDB_SUCCESS);
 
@@ -3589,7 +3589,7 @@ static void test_ldb_duplicate_dn_logging(void **state)
 
 	ret = ldb_msg_add_string(msg02, "objectUUID",
 				 "0123456789abcde2");
-	
+
 	ret = ldb_add(test_ctx->ldb, msg02);
 	assert_int_equal(ret, LDB_ERR_ENTRY_ALREADY_EXISTS);
 
-- 
2.17.0



More information about the samba-technical mailing list