diff --git a/src/util/virsocketaddr.h b/src/util/virsocketaddr.h
index 5230cddf64aabd33b16c3bafa50be8990a62a243..b2ecb3c748272aee83d2ae12a68fdeadc9ca1645 100644
--- a/src/util/virsocketaddr.h
+++ b/src/util/virsocketaddr.h
@@ -16,17 +16,16 @@
* .
*/
-#ifndef LIBVIRT_VIRSOCKETADDR_H
-# define LIBVIRT_VIRSOCKETADDR_H
+#pragma once
-# include
-# include
-# ifdef HAVE_SYS_UN_H
-# include
-# endif
+#include
+#include
+#ifdef HAVE_SYS_UN_H
+# include
+#endif
-# include "internal.h"
-# include "virautoclean.h"
+#include "internal.h"
+#include "virautoclean.h"
/* On architectures which lack these limits, define them (ie. Cygwin).
* Note that the libvirt code should be robust enough to handle the
@@ -34,11 +33,11 @@
* length correctly in second argument to gethostname and by always
* using strncpy instead of strcpy).
*/
-# ifndef INET_ADDRSTRLEN
-# define INET_ADDRSTRLEN 16
-# endif
+#ifndef INET_ADDRSTRLEN
+# define INET_ADDRSTRLEN 16
+#endif
-# define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1"
+#define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1"
typedef struct {
union {
@@ -46,27 +45,27 @@ typedef struct {
struct sockaddr_storage stor;
struct sockaddr_in inet4;
struct sockaddr_in6 inet6;
-# ifdef HAVE_SYS_UN_H
+#ifdef HAVE_SYS_UN_H
struct sockaddr_un un;
-# endif
+#endif
} data;
socklen_t len;
} virSocketAddr;
-# define VIR_SOCKET_ADDR_VALID(s) \
+#define VIR_SOCKET_ADDR_VALID(s) \
((s)->data.sa.sa_family != AF_UNSPEC)
-# define VIR_SOCKET_ADDR_IS_FAMILY(s, f) \
+#define VIR_SOCKET_ADDR_IS_FAMILY(s, f) \
((s)->data.sa.sa_family == f)
-# define VIR_SOCKET_ADDR_FAMILY(s) \
+#define VIR_SOCKET_ADDR_FAMILY(s) \
((s)->data.sa.sa_family)
-# define VIR_SOCKET_ADDR_IPV4_ALL "0.0.0.0"
-# define VIR_SOCKET_ADDR_IPV6_ALL "::"
+#define VIR_SOCKET_ADDR_IPV4_ALL "0.0.0.0"
+#define VIR_SOCKET_ADDR_IPV6_ALL "::"
-# define VIR_SOCKET_ADDR_IPV4_ARPA "in-addr.arpa"
-# define VIR_SOCKET_ADDR_IPV6_ARPA "ip6.arpa"
+#define VIR_SOCKET_ADDR_IPV4_ARPA "in-addr.arpa"
+#define VIR_SOCKET_ADDR_IPV6_ARPA "ip6.arpa"
typedef virSocketAddr *virSocketAddrPtr;
@@ -161,5 +160,3 @@ int virSocketAddrPTRDomain(const virSocketAddr *addr,
void virSocketAddrFree(virSocketAddrPtr addr);
VIR_DEFINE_AUTOPTR_FUNC(virSocketAddr, virSocketAddrFree);
-
-#endif /* LIBVIRT_VIRSOCKETADDR_H */