[Openvpn-devel] Change quoted to angled form when #including external .h files

Message ID 20180413155517.895-1-simon@rozman.si
State Accepted
Headers show
Series [Openvpn-devel] Change quoted to angled form when #including external .h files | expand

Commit Message

Simon Rozman April 13, 2018, 5:55 a.m. UTC
---
 src/openvpn/comp-lz4.c | 2 +-
 src/openvpn/lzo.h      | 8 ++++----
 src/openvpn/memdbg.h   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

Comments

David Sommerseth April 13, 2018, 6:36 a.m. UTC | #1
On 13/04/18 17:55, Simon Rozman wrote:
> ---
>  src/openvpn/comp-lz4.c | 2 +-
>  src/openvpn/lzo.h      | 8 ++++----
>  src/openvpn/memdbg.h   | 4 ++--
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/src/openvpn/comp-lz4.c b/src/openvpn/comp-lz4.c
> index f2916bdd..f52fdbfb 100644
> --- a/src/openvpn/comp-lz4.c
> +++ b/src/openvpn/comp-lz4.c
> @@ -35,7 +35,7 @@
>  #if defined(NEED_COMPAT_LZ4)
>  #include "compat-lz4.h"
>  #else
> -#include "lz4.h"
> +#include <lz4.h>
>  #endif

May I ask what the rationale is for this change?
Simon Rozman April 13, 2018, 6:46 a.m. UTC | #2
May I ask what the rationale is for this change?


Use of angled and quoted form of #include filenames is mostly consistent across the OpenVPN source (src/openvpn) with those few exceptions fixed by this proposed patch.

The rationale for this change is unification of #include sentences.

Regards,
Simon
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>
<blockquote type="cite" class="">
<div class=""><br class="">
</div>
<div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">May
 I ask what the rationale is for this change?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
</div>
</blockquote>
<div><br class="">
</div>
</div>
Use of angled and quoted form of #include filenames is mostly consistent across the OpenVPN source (src/openvpn) with those few exceptions fixed by this proposed patch.
<div class=""><br class="">
</div>
<div class="">The rationale for this change is unification of #include sentences.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Simon</div>
</body>
</html>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Gert Doering Oct. 6, 2018, 9 p.m. UTC | #3
Acked-by: Gert Doering <gert@greenie.muc.de>

"because that's what C recommends" - local header files get "myext.h"
while system files get <sysext.h>

Your patch has been applied to the master branch.

commit 3b7c7858dddc0ddd492acb9d1316e2dd42a807bf
Author: Simon Rozman
Date:   Fri Apr 13 17:55:17 2018 +0200

     Change quoted to angled form when #including external .h files

     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20180413155517.895-1-simon@rozman.si>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16760.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/comp-lz4.c b/src/openvpn/comp-lz4.c
index f2916bdd..f52fdbfb 100644
--- a/src/openvpn/comp-lz4.c
+++ b/src/openvpn/comp-lz4.c
@@ -35,7 +35,7 @@ 
 #if defined(NEED_COMPAT_LZ4)
 #include "compat-lz4.h"
 #else
-#include "lz4.h"
+#include <lz4.h>
 #endif
 
 #include "comp.h"
diff --git a/src/openvpn/lzo.h b/src/openvpn/lzo.h
index 11e1c39f..453cd8ee 100644
--- a/src/openvpn/lzo.h
+++ b/src/openvpn/lzo.h
@@ -39,14 +39,14 @@ 
  */
 
 #if defined(HAVE_LZO_LZOUTIL_H)
-#include "lzo/lzoutil.h"
+#include <lzo/lzoutil.h>
 #elif defined(HAVE_LZOUTIL_H)
-#include "lzoutil.h"
+#include <lzoutil.h>
 #endif
 #if defined(HAVE_LZO_LZO1X_H)
-#include "lzo/lzo1x.h"
+#include <lzo/lzo1x.h>
 #elif defined(HAVE_LZO1X_H)
-#include "lzo1x.h"
+#include <lzo1x.h>
 #endif
 
 #include "buffer.h"
diff --git a/src/openvpn/memdbg.h b/src/openvpn/memdbg.h
index 70c6365d..6da9712b 100644
--- a/src/openvpn/memdbg.h
+++ b/src/openvpn/memdbg.h
@@ -44,7 +44,7 @@ 
 
 #ifdef USE_VALGRIND
 
-#include "valgrind/memcheck.h"
+#include <valgrind/memcheck.h>
 
 #define VALGRIND_MAKE_READABLE(addr, len)
 
@@ -84,7 +84,7 @@ 
  *  #define INTERNAL_MEMORY_SPACE (1024 * 1024 * 50)
  */
 
-#include "dmalloc.h"
+#include <dmalloc.h>
 
 #define openvpn_dmalloc(file, line, size) dmalloc_malloc((file), (line), (size), DMALLOC_FUNC_MALLOC, 0, 0)