[lxc-devel] [lxc/master] fix headers
0x0916 on Github
lxc-bot at linuxcontainers.org
Wed Jul 5 06:07:49 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170705/001c1413/attachment.bin>
-------------- next part --------------
From 74a99f40b3674ff399484d8bc2117027770544ed Mon Sep 17 00:00:00 2001
From: Long Wang <w at laoqinren.net>
Date: Wed, 5 Jul 2017 12:19:37 +0800
Subject: [PATCH 1/2] caps.h: move ifndef/define to the top
Signed-off-by: Long Wang <w at laoqinren.net>
---
src/lxc/caps.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lxc/caps.h b/src/lxc/caps.h
index 2a8c282a5..b4c527eec 100644
--- a/src/lxc/caps.h
+++ b/src/lxc/caps.h
@@ -21,11 +21,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifndef __LXC_CAPS_H
+#define __LXC_CAPS_H
+
#include "config.h"
#include <stdbool.h>
-#ifndef __LXC_CAPS_H
-#define __LXC_CAPS_H
#if HAVE_LIBCAP
#include <sys/capability.h>
From 3705503ac338e214317c4caa9897214eb60be2a9 Mon Sep 17 00:00:00 2001
From: Long Wang <w at laoqinren.net>
Date: Wed, 5 Jul 2017 12:20:28 +0800
Subject: [PATCH 2/2] use same ifndef/define format for all headers
Signed-off-by: Long Wang <w at laoqinren.net>
---
src/include/getline.h | 4 ++--
src/include/getsubopt.h | 4 ++--
src/include/lxcmntent.h | 4 ++--
src/include/openpty.h | 4 ++--
src/lxc/lsm/lsm.h | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/include/getline.h b/src/include/getline.h
index ddf4f157f..68452daf1 100644
--- a/src/include/getline.h
+++ b/src/include/getline.h
@@ -27,8 +27,8 @@
* SUCH DAMAGE.
*/
-#ifndef _getline_h
-#define _getline_h
+#ifndef _GETLINE_H
+#define _GETLINE_H
#include <stdio.h>
diff --git a/src/include/getsubopt.h b/src/include/getsubopt.h
index b4e16223f..e45cf66b0 100644
--- a/src/include/getsubopt.h
+++ b/src/include/getsubopt.h
@@ -1,4 +1,4 @@
-#ifndef _getsubopt_h
-#define _getsubopt_h
+#ifndef _GETSUBOPT_H
+#define _GETSUBOPT_H
int getsubopt (char **optionp, char *const *tokens, char **valuep);
#endif
diff --git a/src/include/lxcmntent.h b/src/include/lxcmntent.h
index 25df5b96f..1d45d4826 100644
--- a/src/include/lxcmntent.h
+++ b/src/include/lxcmntent.h
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _lxcmntent_h
-#define _lxcmntent_h
+#ifndef _LXCMNTENT_H
+#define _LXCMNTENT_H
#if IS_BIONIC
struct mntent
diff --git a/src/include/openpty.h b/src/include/openpty.h
index ddc9c8113..6e7bf8d2d 100644
--- a/src/include/openpty.h
+++ b/src/include/openpty.h
@@ -21,8 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _openpty_h
-#define _openpty_h
+#ifndef _OPENPTY_H
+#define _OPENPTY_H
#include <termios.h>
#include <sys/ioctl.h>
diff --git a/src/lxc/lsm/lsm.h b/src/lxc/lsm/lsm.h
index d6a7aac0d..b915e8ddd 100644
--- a/src/lxc/lsm/lsm.h
+++ b/src/lxc/lsm/lsm.h
@@ -21,8 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __lxc_lsm_h
-#define __lxc_lsm_h
+#ifndef __LXC_LSM_H
+#define __LXC_LSM_H
struct lxc_conf;
More information about the lxc-devel
mailing list