summary refs log tree commit diff
path: root/src/systemd/sd-adapt-core
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemd/sd-adapt-core')
-rw-r--r--src/systemd/sd-adapt-core/nm-sd-adapt-core.c10
-rw-r--r--src/systemd/sd-adapt-core/nm-sd-adapt-core.h93
2 files changed, 51 insertions, 52 deletions
diff --git a/src/systemd/sd-adapt-core/nm-sd-adapt-core.c b/src/systemd/sd-adapt-core/nm-sd-adapt-core.c
index a9f8bd1c..f0f85c43 100644
--- a/src/systemd/sd-adapt-core/nm-sd-adapt-core.c
+++ b/src/systemd/sd-adapt-core/nm-sd-adapt-core.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (C) 2014 - 2016 Red Hat, Inc.
  */
@@ -12,10 +12,10 @@
 /*****************************************************************************/
 
 int
-asynchronous_close (int fd) {
-	safe_close (fd);
-	return -1;
+asynchronous_close(int fd)
+{
+    safe_close(fd);
+    return -1;
 }
 
 /*****************************************************************************/
-
diff --git a/src/systemd/sd-adapt-core/nm-sd-adapt-core.h b/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
index 81bc7320..0ec6ade1 100644
--- a/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
+++ b/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /*
  * Copyright (C) 2014 - 2018 Red Hat, Inc.
  */
@@ -15,7 +15,7 @@
 #include "systemd/sd-adapt-shared/nm-sd-adapt-shared.h"
 
 #ifndef HAVE_SYS_AUXV_H
-#define HAVE_SYS_AUXV_H 0
+    #define HAVE_SYS_AUXV_H 0
 #endif
 
 /*****************************************************************************
@@ -25,62 +25,61 @@
 
 #if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_SYSTEMD
 
-#include <netinet/in.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <elf.h>
-#ifdef HAVE_SYS_AUXV_H
-#include <sys/auxv.h>
-#endif
-#include <unistd.h>
-#include <sys/syscall.h>
-#include <sys/ioctl.h>
-
-/* Missing in Linux 3.2.0, in Ubuntu 12.04 */
-#ifndef BPF_XOR
-#define BPF_XOR 0xa0
-#endif
-
-#ifndef ETHERTYPE_LLDP
-#define ETHERTYPE_LLDP 0x88cc
-#endif
-
-#ifndef HAVE_SECURE_GETENV
-#  ifdef HAVE___SECURE_GETENV
-#    define secure_getenv __secure_getenv
-#  else
-#    error neither secure_getenv nor __secure_getenv is available
-#  endif
-#endif
+    #include <netinet/in.h>
+    #include <string.h>
+    #include <stdio.h>
+    #include <errno.h>
+    #include <elf.h>
+    #ifdef HAVE_SYS_AUXV_H
+        #include <sys/auxv.h>
+    #endif
+    #include <unistd.h>
+    #include <sys/syscall.h>
+    #include <sys/ioctl.h>
+
+    /* Missing in Linux 3.2.0, in Ubuntu 12.04 */
+    #ifndef BPF_XOR
+        #define BPF_XOR 0xa0
+    #endif
+
+    #ifndef ETHERTYPE_LLDP
+        #define ETHERTYPE_LLDP 0x88cc
+    #endif
+
+    #ifndef HAVE_SECURE_GETENV
+        #ifdef HAVE___SECURE_GETENV
+            #define secure_getenv __secure_getenv
+        #else
+            #error neither secure_getenv nor __secure_getenv is available
+        #endif
+    #endif
 
 /*****************************************************************************/
 
 static inline int
-sd_notify (int unset_environment, const char *state)
+sd_notify(int unset_environment, const char *state)
 {
-	return 0;
+    return 0;
 }
 
-/* Can't include both net/if.h and linux/if.h; so have to define this here */
-#ifndef IF_NAMESIZE
-#define IF_NAMESIZE 16
-#endif
+    /* Can't include both net/if.h and linux/if.h; so have to define this here */
+    #ifndef IF_NAMESIZE
+        #define IF_NAMESIZE 16
+    #endif
 
-#ifndef IFNAMSIZ
-#define IFNAMSIZ IF_NAMESIZE
-#endif
+    #ifndef IFNAMSIZ
+        #define IFNAMSIZ IF_NAMESIZE
+    #endif
 
-#ifndef MAX_HANDLE_SZ
-#define MAX_HANDLE_SZ 128
-#endif
+    #ifndef MAX_HANDLE_SZ
+        #define MAX_HANDLE_SZ 128
+    #endif
 
-#include "sd-id128.h"
-#include "sparse-endian.h"
-#include "async.h"
-#include "util.h"
+    #include "sd-id128.h"
+    #include "sparse-endian.h"
+    #include "async.h"
+    #include "util.h"
 
 #endif /* (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_SYSTEMD */
 
 #endif /* __NM_SD_ADAPT_CORE_H__ */
-