[PATCH] Missing tidyup for bug #12932

Jeremy Allison jra at samba.org
Mon Aug 14 23:06:04 UTC 2017


On Tue, Aug 15, 2017 at 12:49:33AM +0200, Stefan Metzmacher via samba-technical wrote:
> Hi Jeremy,
> 
> > Sure, I'll prepare a patch.
> > 
> >> $ git grep '"lib/tevent/tevent.h"'
> >> lib/async_req/async_connect_send_test.c:#include "lib/tevent/tevent.h"
> >> lib/tevent/testsuite.c:#include "lib/tevent/tevent.h"
> > 
> > Shouldn't the one inside lib/tevent/testsuite.c should point
> > at the internal one ? Isn't self-testing a special case here ?
> 
> Yes, but then it needs to be just "tevent.h" I guess

Proposed patch attached for your review !

Jeremy.
-------------- next part --------------
From 47b568710639d5bf9d6cf3f22b33e818870b73bc Mon Sep 17 00:00:00 2001
From: Jeremy Allison <jra at samba.org>
Date: Mon, 14 Aug 2017 15:54:39 -0700
Subject: [PATCH 1/2] lib: tevent: Use system <tevent.h>, not internal header
 path (except in self-test).

Signed-off-by: Jeremy Allison <jra at samba.org>
---
 lib/async_req/async_connect_send_test.c     | 2 +-
 lib/tevent/testsuite.c                      | 2 +-
 source4/librpc/rpc/dcerpc_roh_channel_in.c  | 2 +-
 source4/librpc/rpc/dcerpc_roh_channel_out.c | 2 +-
 source4/torture/smb2/rename.c               | 2 +-
 source4/torture/smb2/sharemode.c            | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/async_req/async_connect_send_test.c b/lib/async_req/async_connect_send_test.c
index 34ea6b7d3d7..d570c609d7f 100644
--- a/lib/async_req/async_connect_send_test.c
+++ b/lib/async_req/async_connect_send_test.c
@@ -17,7 +17,7 @@
  */
 
 #include "replace.h"
-#include "lib/tevent/tevent.h"
+#include <tevent.h>
 #include "lib/async_req/async_sock.h"
 #include <stdio.h>
 #include <string.h>
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
index ee29e5bf8c7..e5084521540 100644
--- a/lib/tevent/testsuite.c
+++ b/lib/tevent/testsuite.c
@@ -25,7 +25,7 @@
 */
 
 #include "includes.h"
-#include "lib/tevent/tevent.h"
+#include "tevent.h"
 #include "system/filesys.h"
 #include "system/select.h"
 #include "system/network.h"
diff --git a/source4/librpc/rpc/dcerpc_roh_channel_in.c b/source4/librpc/rpc/dcerpc_roh_channel_in.c
index d6c37a33827..790b8b9a5ee 100644
--- a/source4/librpc/rpc/dcerpc_roh_channel_in.c
+++ b/source4/librpc/rpc/dcerpc_roh_channel_in.c
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/tevent/tevent.h"
+#include <tevent.h>
 #include "lib/talloc/talloc.h"
 #include "lib/tsocket/tsocket.h"
 #include "lib/tls/tls.h"
diff --git a/source4/librpc/rpc/dcerpc_roh_channel_out.c b/source4/librpc/rpc/dcerpc_roh_channel_out.c
index 4e1c93445ce..b3b801a4014 100644
--- a/source4/librpc/rpc/dcerpc_roh_channel_out.c
+++ b/source4/librpc/rpc/dcerpc_roh_channel_out.c
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/tevent/tevent.h"
+#include <tevent.h>
 #include "lib/talloc/talloc.h"
 #include "lib/tsocket/tsocket.h"
 #include "lib/tls/tls.h"
diff --git a/source4/torture/smb2/rename.c b/source4/torture/smb2/rename.c
index 4c41c8b7d43..5055cf24344 100644
--- a/source4/torture/smb2/rename.c
+++ b/source4/torture/smb2/rename.c
@@ -22,7 +22,7 @@
 #include "includes.h"
 #include "libcli/smb2/smb2.h"
 #include "libcli/smb2/smb2_calls.h"
-#include "lib/tevent/tevent.h"
+#include <tevent.h>
 #include "lib/util/tevent_ntstatus.h"
 
 #include "torture/torture.h"
diff --git a/source4/torture/smb2/sharemode.c b/source4/torture/smb2/sharemode.c
index f59927c5b39..d1ad22e477d 100644
--- a/source4/torture/smb2/sharemode.c
+++ b/source4/torture/smb2/sharemode.c
@@ -25,7 +25,7 @@
 #include "libcli/security/security.h"
 #include "torture/torture.h"
 #include "torture/smb2/proto.h"
-#include "lib/tevent/tevent.h"
+#include <tevent.h>
 
 #define BASEDIRHOLD "sharemode_hold_test"
 
-- 
2.14.0.434.g98096fd7a8-goog


From 98fadb9af6abe4f74eda39575659cd0d5acd82b1 Mon Sep 17 00:00:00 2001
From: Jeremy Allison <jra at samba.org>
Date: Mon, 14 Aug 2017 16:04:18 -0700
Subject: [PATCH 2/2] lib: talloc: Use the system <talloc.h> include.

Signed-off-by: Jeremy Allison <jra at samba.org>
---
 source4/lib/wmi/wbemdata.c                  | 2 +-
 source4/librpc/rpc/dcerpc_roh_channel_in.c  | 2 +-
 source4/librpc/rpc/dcerpc_roh_channel_out.c | 2 +-
 testprogs/win32/spoolss/testspoolss.h       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/source4/lib/wmi/wbemdata.c b/source4/lib/wmi/wbemdata.c
index df98da43a2a..d4750678a91 100644
--- a/source4/lib/wmi/wbemdata.c
+++ b/source4/lib/wmi/wbemdata.c
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include <talloc.h>
 #include "librpc/gen_ndr/dcom.h"
 #include "librpc/gen_ndr/com_dcom.h"
 #include "librpc/ndr/libndr.h"
@@ -30,7 +31,6 @@
 #include "librpc/gen_ndr/ndr_dcom.h"
 #include "librpc/rpc/dcerpc.h"
 #include "librpc/gen_ndr/ndr_misc.h"
-#include "lib/talloc/talloc.h"
 #include "libcli/composite/composite.h"
 #include "lib/wmi/wmi.h"
 #include "librpc/gen_ndr/ndr_wmi.h"
diff --git a/source4/librpc/rpc/dcerpc_roh_channel_in.c b/source4/librpc/rpc/dcerpc_roh_channel_in.c
index 790b8b9a5ee..d6707bf8680 100644
--- a/source4/librpc/rpc/dcerpc_roh_channel_in.c
+++ b/source4/librpc/rpc/dcerpc_roh_channel_in.c
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 #include <tevent.h>
-#include "lib/talloc/talloc.h"
+#include <talloc.h>
 #include "lib/tsocket/tsocket.h"
 #include "lib/tls/tls.h"
 #include "lib/util/tevent_ntstatus.h"
diff --git a/source4/librpc/rpc/dcerpc_roh_channel_out.c b/source4/librpc/rpc/dcerpc_roh_channel_out.c
index b3b801a4014..23cbce3022d 100644
--- a/source4/librpc/rpc/dcerpc_roh_channel_out.c
+++ b/source4/librpc/rpc/dcerpc_roh_channel_out.c
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 #include <tevent.h>
-#include "lib/talloc/talloc.h"
+#include <talloc.h>
 #include "lib/tsocket/tsocket.h"
 #include "lib/tls/tls.h"
 #include "lib/util/tevent_ntstatus.h"
diff --git a/testprogs/win32/spoolss/testspoolss.h b/testprogs/win32/spoolss/testspoolss.h
index f025fccb3f9..eb19c64fa67 100644
--- a/testprogs/win32/spoolss/testspoolss.h
+++ b/testprogs/win32/spoolss/testspoolss.h
@@ -29,7 +29,7 @@
 #include "printlib_proto.h"
 
 #if 0
-#include "lib/talloc/talloc.h"
+#include <talloc.h>
 #include "libcli/util/ntstatus.h"
 #include "lib/torture/torture.h"
 #endif
-- 
2.14.0.434.g98096fd7a8-goog



More information about the samba-technical mailing list