From bd4ed5bd9982e0d8880f1dacccfe1053a635901a Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Tue, 18 Jun 2019 11:12:58 -0500 Subject: [PATCH] util: command: use #pragma once in headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathon Jongsma Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- src/util/vircommand.h | 11 ++++------- src/util/vircommandpriv.h | 7 ++----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/util/vircommand.h b/src/util/vircommand.h index c03da43f25..c9a8d3c41c 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -19,12 +19,11 @@ * */ -#ifndef LIBVIRT_VIRCOMMAND_H -# define LIBVIRT_VIRCOMMAND_H +#pragma once -# include "internal.h" -# include "virbuffer.h" -# include "virautoclean.h" +#include "internal.h" +#include "virbuffer.h" +#include "virautoclean.h" typedef struct _virCommand virCommand; typedef virCommand *virCommandPtr; @@ -222,5 +221,3 @@ int virCommandRunNul(virCommandPtr cmd, void *data); VIR_DEFINE_AUTOPTR_FUNC(virCommand, virCommandFree); - -#endif /* LIBVIRT_VIRCOMMAND_H */ diff --git a/src/util/vircommandpriv.h b/src/util/vircommandpriv.h index e2f4c19596..80f1d1376c 100644 --- a/src/util/vircommandpriv.h +++ b/src/util/vircommandpriv.h @@ -23,10 +23,9 @@ # error "vircommandpriv.h may only be included by vircommand.c or test suites" #endif /* LIBVIRT_VIRCOMMANDPRIV_H_ALLOW */ -#ifndef LIBVIRT_VIRCOMMANDPRIV_H -# define LIBVIRT_VIRCOMMANDPRIV_H +#pragma once -# include "vircommand.h" +#include "vircommand.h" typedef void (*virCommandDryRunCallback)(const char *const*args, const char *const*env, @@ -39,5 +38,3 @@ typedef void (*virCommandDryRunCallback)(const char *const*args, void virCommandSetDryRun(virBufferPtr buf, virCommandDryRunCallback cb, void *opaque); - -#endif /* LIBVIRT_VIRCOMMANDPRIV_H */