diff mbox series

[kvm-unit-tests,2/2] add header guards for non-trivial headers

Message ID 20210610135937.94375-3-cohuck@redhat.com (mailing list archive)
State New, archived
Headers show
Series header guards: further cleanup | expand

Commit Message

Cornelia Huck June 10, 2021, 1:59 p.m. UTC
Add header guards to headers that do not simply include another one.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 lib/argv.h       | 5 +++++
 lib/arm/io.h     | 5 +++++
 lib/powerpc/io.h | 5 +++++
 3 files changed, 15 insertions(+)

Comments

Laurent Vivier June 10, 2021, 2:30 p.m. UTC | #1
On 10/06/2021 15:59, Cornelia Huck wrote:
> Add header guards to headers that do not simply include another one.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  lib/argv.h       | 5 +++++
>  lib/arm/io.h     | 5 +++++
>  lib/powerpc/io.h | 5 +++++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/lib/argv.h b/lib/argv.h
> index e5fcf8482ca8..1fd746dc2177 100644
> --- a/lib/argv.h
> +++ b/lib/argv.h
> @@ -5,7 +5,12 @@
>   * under the terms of the GNU Library General Public License version 2.
>   */
>  
> +#ifndef _ARGV_H_
> +#define _ARGV_H_
> +
>  extern void __setup_args(void);
>  extern void setup_args_progname(const char *args);
>  extern void setup_env(char *env, int size);
>  extern void add_setup_arg(const char *arg);
> +
> +#endif
> diff --git a/lib/arm/io.h b/lib/arm/io.h
> index 2746d72e8280..183479c899a9 100644
> --- a/lib/arm/io.h
> +++ b/lib/arm/io.h
> @@ -4,4 +4,9 @@
>   * This work is licensed under the terms of the GNU GPL, version 2.
>   */
>  
> +#ifndef _ARM_IO_H_
> +#define _ARM_IO_H_
> +
>  extern void io_init(void);
> +
> +#endif
> diff --git a/lib/powerpc/io.h b/lib/powerpc/io.h
> index 1f5a7bd6d745..d4f21ba15a54 100644
> --- a/lib/powerpc/io.h
> +++ b/lib/powerpc/io.h
> @@ -4,5 +4,10 @@
>   * This work is licensed under the terms of the GNU GPL, version 2.
>   */
>  
> +#ifndef _POWERPC_IO_H_
> +#define _POWERPC_IO_H_
> +
>  extern void io_init(void);
>  extern void putchar(int c);
> +
> +#endif
> 

Reviewed-by: Laurent Vivier <lvivier@redhat.com>
diff mbox series

Patch

diff --git a/lib/argv.h b/lib/argv.h
index e5fcf8482ca8..1fd746dc2177 100644
--- a/lib/argv.h
+++ b/lib/argv.h
@@ -5,7 +5,12 @@ 
  * under the terms of the GNU Library General Public License version 2.
  */
 
+#ifndef _ARGV_H_
+#define _ARGV_H_
+
 extern void __setup_args(void);
 extern void setup_args_progname(const char *args);
 extern void setup_env(char *env, int size);
 extern void add_setup_arg(const char *arg);
+
+#endif
diff --git a/lib/arm/io.h b/lib/arm/io.h
index 2746d72e8280..183479c899a9 100644
--- a/lib/arm/io.h
+++ b/lib/arm/io.h
@@ -4,4 +4,9 @@ 
  * This work is licensed under the terms of the GNU GPL, version 2.
  */
 
+#ifndef _ARM_IO_H_
+#define _ARM_IO_H_
+
 extern void io_init(void);
+
+#endif
diff --git a/lib/powerpc/io.h b/lib/powerpc/io.h
index 1f5a7bd6d745..d4f21ba15a54 100644
--- a/lib/powerpc/io.h
+++ b/lib/powerpc/io.h
@@ -4,5 +4,10 @@ 
  * This work is licensed under the terms of the GNU GPL, version 2.
  */
 
+#ifndef _POWERPC_IO_H_
+#define _POWERPC_IO_H_
+
 extern void io_init(void);
 extern void putchar(int c);
+
+#endif