Skip to contentSkip to conversation

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

PATCH In review Simon Rozman 3 participants 4 messages Apr 13, 2018 – Oct 7, 2018

lore
Share & tools
lore
#0 lore raw

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

---
 src/openvpn/comp-lz4.c | 2 +-
 src/openvpn/lzo.h      | 8 ++++----
 src/openvpn/memdbg.h   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
src/openvpn/comp-lz4.c +1 -1
index f2916bdd..f52fdbfb 100644
@@ -35,7 +35,7 @@
 #if defined(NEED_COMPAT_LZ4)
 #include "compat-lz4.h"
 #else
-#include "lz4.h"
+#include <lz4.h>
 #endif
 
 #include "comp.h"
src/openvpn/lzo.h +4 -4
index 11e1c39f..453cd8ee 100644
@@ -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"
src/openvpn/memdbg.h +2 -2
index 70c6365d..6da9712b 100644
@@ -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)
 
Signature · 1 line
2.15.1 (Apple Git-101)
#1 lore raw
Quoted 11 lines · Simon Rozman
---
 src/openvpn/comp-lz4.c | 2 +-
 src/openvpn/lzo.h      | 8 ++++----
 src/openvpn/memdbg.h   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
src/openvpn/comp-lz4.c +0 -0
index f2916bdd..f52fdbfb 100644

src/openvpn/comp-lz4.c line 39

Quoted 6 lines
src/openvpn/comp-lz4.c +1 -1
@@ -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?

Signature · 4 lines
kind regards,

David Sommerseth
OpenVPN Inc
#2 lore raw

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

Acked-by on v1 1/1
#3 lore raw
In reply to Simon Rozman

"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 <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg16760.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering