diff mbox

[OpenWrt-Devel,procd,v2,05/17] ujail: use "#pragma once" in .h where needed

Message ID 1448474090-30280-6-git-send-email-champetier.etienne@gmail.com
State Changes Requested
Headers show

Commit Message

Etienne Champetier Nov. 25, 2015, 5:54 p.m. UTC
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
---
 jail/capabilities.h | 1 +
 jail/elf.h          | 4 +---
 jail/log.h          | 1 +
 jail/seccomp.h      | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

Comments

John Crispin Nov. 25, 2015, 6:50 p.m. UTC | #1
Hi,

our code uses the ifdef pattern in all projects and we would like to
keep it that way.

	JOhn

On 25/11/2015 18:54, Etienne CHAMPETIER wrote:
> Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
> ---
>  jail/capabilities.h | 1 +
>  jail/elf.h          | 4 +---
>  jail/log.h          | 1 +
>  jail/seccomp.h      | 1 +
>  4 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/jail/capabilities.h b/jail/capabilities.h
> index e6699e9..beb67cc 100644
> --- a/jail/capabilities.h
> +++ b/jail/capabilities.h
> @@ -10,5 +10,6 @@
>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   * GNU General Public License for more details.
>   */
> +#pragma once
>  
>  int drop_capabilities(const char *file);
> diff --git a/jail/elf.h b/jail/elf.h
> index ddbe234..82cbe14 100644
> --- a/jail/elf.h
> +++ b/jail/elf.h
> @@ -10,8 +10,8 @@
>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   * GNU General Public License for more details.
>   */
> +#pragma once
>  
> -#ifndef _ELF_H__
>  #include <libubox/avl.h>
>  #include <libubox/avl-cmp.h>
>  
> @@ -34,5 +34,3 @@ void alloc_library_path(const char *path);
>  int elf_load_deps(const char *library);
>  const char* find_lib(const char *file);
>  void load_ldso_conf(const char *conf);
> -
> -#endif
> diff --git a/jail/log.h b/jail/log.h
> index b1d201e..89e797b 100644
> --- a/jail/log.h
> +++ b/jail/log.h
> @@ -10,6 +10,7 @@
>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   * GNU General Public License for more details.
>   */
> +#pragma once
>  
>  extern int debug;
>  #include <syslog.h>
> diff --git a/jail/seccomp.h b/jail/seccomp.h
> index 45eede7..6540246 100644
> --- a/jail/seccomp.h
> +++ b/jail/seccomp.h
> @@ -10,6 +10,7 @@
>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   * GNU General Public License for more details.
>   */
> +#pragma once
>  
>  #define INFO(fmt, ...) do { \
>  	syslog(LOG_INFO,"preload-seccomp: "fmt, ## __VA_ARGS__); \
>
diff mbox

Patch

diff --git a/jail/capabilities.h b/jail/capabilities.h
index e6699e9..beb67cc 100644
--- a/jail/capabilities.h
+++ b/jail/capabilities.h
@@ -10,5 +10,6 @@ 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#pragma once
 
 int drop_capabilities(const char *file);
diff --git a/jail/elf.h b/jail/elf.h
index ddbe234..82cbe14 100644
--- a/jail/elf.h
+++ b/jail/elf.h
@@ -10,8 +10,8 @@ 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#pragma once
 
-#ifndef _ELF_H__
 #include <libubox/avl.h>
 #include <libubox/avl-cmp.h>
 
@@ -34,5 +34,3 @@  void alloc_library_path(const char *path);
 int elf_load_deps(const char *library);
 const char* find_lib(const char *file);
 void load_ldso_conf(const char *conf);
-
-#endif
diff --git a/jail/log.h b/jail/log.h
index b1d201e..89e797b 100644
--- a/jail/log.h
+++ b/jail/log.h
@@ -10,6 +10,7 @@ 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#pragma once
 
 extern int debug;
 #include <syslog.h>
diff --git a/jail/seccomp.h b/jail/seccomp.h
index 45eede7..6540246 100644
--- a/jail/seccomp.h
+++ b/jail/seccomp.h
@@ -10,6 +10,7 @@ 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#pragma once
 
 #define INFO(fmt, ...) do { \
 	syslog(LOG_INFO,"preload-seccomp: "fmt, ## __VA_ARGS__); \