[PATCH] some dbwrap include cleanup

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Oct 29 04:28:56 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 df4447772e653899835e6e713b74e31fb7afbc5d Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 29 Oct 2014 10:12:02 +0100
Subject: [PATCH 1/4] dbwrap: Avoid an unnecessary #include

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 lib/dbwrap/dbwrap_cache.h |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/dbwrap/dbwrap_cache.h b/lib/dbwrap/dbwrap_cache.h
index cd290e1..e69d58e 100644
--- a/lib/dbwrap/dbwrap_cache.h
+++ b/lib/dbwrap/dbwrap_cache.h
@@ -20,11 +20,7 @@
 #ifndef __DBWRAP_CACHE_H__
 #define __DBWRAP_CACHE_H__
 
-#include <talloc.h>
-
-#include "dbwrap/dbwrap_private.h"
-
-struct db_context;
+#include "dbwrap.h"
 
 struct db_context *db_open_cache(TALLOC_CTX *mem_ctx,
 				 struct db_context *backing);
-- 
1.7.9.5


From 9b38831f8c2d5496f9c3b18f18a512839cc40fbf Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 29 Oct 2014 10:19:43 +0100
Subject: [PATCH 2/4] lib: loadparm.h uses TALLOC_CTX

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 lib/param/loadparm.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h
index 11632de..4d5c54e 100644
--- a/lib/param/loadparm.h
+++ b/lib/param/loadparm.h
@@ -30,6 +30,7 @@
 #ifndef _LOADPARM_H
 #define _LOADPARM_H
 
+#include <talloc.h>
 #include "../lib/util/parmlist.h"
 
 /* the following are used by loadparm for option lists */
-- 
1.7.9.5


From 41fa7370fce0923a48b650c8bdf5eceaff51125b Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 29 Oct 2014 10:20:20 +0100
Subject: [PATCH 3/4] dbwrap: Add some required #includes to dbwrap.h

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 lib/dbwrap/dbwrap.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/dbwrap/dbwrap.h b/lib/dbwrap/dbwrap.h
index d289243..e56e036 100644
--- a/lib/dbwrap/dbwrap.h
+++ b/lib/dbwrap/dbwrap.h
@@ -20,6 +20,9 @@
 #ifndef __DBWRAP_H__
 #define __DBWRAP_H__
 
+#include "replace.h"
+#include <talloc.h>
+#include "libcli/util/ntstatus.h"
 #include "tdb.h"
 
 struct db_record;
-- 
1.7.9.5


From 9648bee63a36ef2d229f0f14ba76fd4d70ace6ef Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 29 Oct 2014 10:21:16 +0100
Subject: [PATCH 4/4] dbwrap: Avoid "includes.h" in dbwrap_cache.c

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 lib/dbwrap/dbwrap_cache.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/dbwrap/dbwrap_cache.c b/lib/dbwrap/dbwrap_cache.c
index c5f7cce..724389e 100644
--- a/lib/dbwrap/dbwrap_cache.c
+++ b/lib/dbwrap/dbwrap_cache.c
@@ -17,11 +17,12 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "includes.h"
-#include "lib/dbwrap/dbwrap.h"
+#include "replace.h"
+#include "lib/param/loadparm.h"
+#include "lib/dbwrap/dbwrap_cache.h"
 #include "lib/dbwrap/dbwrap_private.h"
 #include "lib/dbwrap/dbwrap_rbt.h"
-#include "lib/dbwrap/dbwrap_cache.h"
+#include "lib/util/talloc_stack.h"
 
 struct db_cache_ctx {
 	int seqnum;
-- 
1.7.9.5



More information about the samba-technical mailing list