]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use '#pragma once' for header guard
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 29 Aug 2018 18:38:28 +0000 (03:38 +0900)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 30 Aug 2018 03:10:43 +0000 (06:10 +0300)
Follow-up for a2b635eb3940f33f5dd308d85ba416f0630d152b (#9959).

14 files changed:
src/basic/MurmurHash2.h
src/basic/securebits.h
src/basic/sparse-endian.h
src/boot/efi/console.h
src/boot/efi/disk.h
src/boot/efi/graphics.h
src/boot/efi/linux.h
src/boot/efi/measure.h
src/boot/efi/pe.h
src/boot/efi/shim.h
src/boot/efi/splash.h
src/boot/efi/util.h
src/journal/fsprg.h
src/shared/initreq.h

index 6104b4fbe68c62308c1310f46079ca8c48ab86a0..1aef3afba0648a245fc8bcb986293f5a3d2a2b35 100644 (file)
@@ -2,8 +2,7 @@
 // MurmurHash2 was written by Austin Appleby, and is placed in the public
 // domain. The author hereby disclaims copyright to this source code.
 
-#ifndef _MURMURHASH2_H_
-#define _MURMURHASH2_H_
+#pragma once
 
 //-----------------------------------------------------------------------------
 // Platform-specific functions and macros
@@ -29,5 +28,3 @@ typedef unsigned __int64 uint64_t;
 uint32_t MurmurHash2        ( const void * key, int len, uint32_t seed );
 
 //-----------------------------------------------------------------------------
-
-#endif // _MURMURHASH2_H_
index 98fbe0d433e5f5d1bf5c54984ad22b1b3759aba5..e3b7538b0cffd6170f1ba84fd35740511684d216 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef _LINUX_SECUREBITS_H
-#define _LINUX_SECUREBITS_H 1
+#pragma once
 
 /* This is minimal version of Linux' linux/securebits.h header file,
  * which is licensed GPL2 */
@@ -41,5 +40,3 @@
                                  issecure_mask(SECURE_NO_SETUID_FIXUP) | \
                                  issecure_mask(SECURE_KEEP_CAPS))
 #define SECURE_ALL_LOCKS       (SECURE_ALL_BITS << 1)
-
-#endif /* !_LINUX_SECUREBITS_H */
index 5e59de543787f8ae604f80c02a09bf5141a6554b..8540ccd0ba37d99d4f1ab6ebcedef6b6e435622e 100644 (file)
@@ -20,8 +20,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
  */
-#ifndef SPARSE_ENDIAN_H
-#define SPARSE_ENDIAN_H
+#pragma once
 
 #include <byteswap.h>
 #include <endian.h>
@@ -89,5 +88,3 @@ static inline uint64_t be64toh(be64_t value) { return bswap_64_on_le((uint64_t _
 
 #undef __sd_bitwise
 #undef __sd_force
-
-#endif /* SPARSE_ENDIAN_H */
index 3643d3dec4505809a1616624fb0b089989d3f80c..10c5ce4ebdb30f826998a63f3e057b54a578a313 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __SDBOOT_CONSOLE_H
-#define __SDBOOT_CONSOLE_H
+#pragma once
 
 #define EFI_SHIFT_STATE_VALID           0x80000000
 #define EFI_RIGHT_CONTROL_PRESSED       0x00000004
@@ -24,4 +22,3 @@ enum console_mode_change_type {
 
 EFI_STATUS console_key_read(UINT64 *key, BOOLEAN wait);
 EFI_STATUS console_set_mode(UINTN *mode, enum console_mode_change_type how);
-#endif
index dfd9200ae1dd92544b7d8791719adb8a86a380f2..2a0b8ff2a74696723e5e718a626b62f2fbc78614 100644 (file)
@@ -1,7 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __SDBOOT_DISK_H
-#define __SDBOOT_DISK_H
+#pragma once
 
 EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]);
-#endif
index 56a3ebdd9d8d75ae2be9d656bf44b6743cf5c0a9..809e878d16ce2f951571cb27feada236f8058d0b 100644 (file)
@@ -3,9 +3,6 @@
  * Copyright © 2013 Intel Corporation
  *   Authored by Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  */
-
-#ifndef __SDBOOT_GRAPHICS_H
-#define __SDBOOT_GRAPHICS_H
+#pragma once
 
 EFI_STATUS graphics_mode(BOOLEAN on);
-#endif
index 54140a220749e3fe592021bc7b62aad5b58a40c2..2458a2fbd07c83530dc6915a3fafacca1a443d49 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __SDBOOT_kernel_H
-#define __SDBOOT_kernel_H
+#pragma once
 
 EFI_STATUS linux_exec(EFI_HANDLE *image,
                       CHAR8 *cmdline, UINTN cmdline_size,
                       UINTN linux_addr,
                       UINTN initrd_addr, UINTN initrd_size, BOOLEAN secure);
-#endif
index e04ee127a3f69a8296321fc0dea1125656a8edc9..ebb6406ecaac59269a47122ed279a74d459d4a8c 100644 (file)
@@ -1,7 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef __SDBOOT_MEASURE_H
-#define __SDBOOT_MEASURE_H
+#pragma once
 
 EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description);
-
-#endif
index d3fc8ecf6b8c834ae9e1b825d969081e618c0d61..bfbb8d9baf4f9aeddff291fcc4b3636a4320ae76 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __SDBOOT_PEFILE_H
-#define __SDBOOT_PEFILE_H
+#pragma once
 
 EFI_STATUS pe_memory_locate_sections(CHAR8 *base,
                                      CHAR8 **sections, UINTN *addrs, UINTN *offsets, UINTN *sizes);
 EFI_STATUS pe_file_locate_sections(EFI_FILE *dir, CHAR16 *path,
                                    CHAR8 **sections, UINTN *addrs, UINTN *offsets, UINTN *sizes);
-#endif
index c847ae97a40b7f788f0f7f219a7a604b054e7a48..6b3b78c175019aac10d83e7a88f6ae516b93c9a7 100644 (file)
@@ -7,9 +7,7 @@
  * Copyright © 2012 <James.Bottomley@HansenPartnership.com>
  * https://github.com/mjg59/efitools
  */
-
-#ifndef __SDBOOT_SHIM_H
-#define __SDBOOT_SHIM_H
+#pragma once
 
 BOOLEAN shim_loaded(void);
 
@@ -18,5 +16,3 @@ BOOLEAN secure_boot_enabled(void);
 EFI_STATUS security_policy_install(void);
 
 EFI_STATUS security_policy_uninstall(void);
-
-#endif
index f194a33aecf77f78cd0722365dd33615f6ab06c7..8928b069a2012425969b2f60130b4b9959f96b54 100644 (file)
@@ -1,7 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __SDBOOT_SPLASH_H
-#define __SDBOOT_SPLASH_H
+#pragma once
 
 EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background);
-#endif
index 3baec8cd41b6aff3d5201b826dcacf5b970d7884..8a3e0520fcd958ab90df7aec1bfeb2cffea82c6c 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __SDBOOT_UTIL_H
-#define __SDBOOT_UTIL_H
+#pragma once
 
 #include <efi.h>
 #include <efilib.h>
@@ -39,5 +37,3 @@ static inline void FreePoolp(void *p) {
 
 #define _cleanup_(x) __attribute__((cleanup(x)))
 #define _cleanup_freepool_ _cleanup_(FreePoolp)
-
-#endif
index fc95b3be7c59dc371c561853ffd74d3124faae30..33412675b8c4928a61c8d79c42fb5a562128b9c1 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-
-#ifndef __fsprgh__
-#define __fsprgh__
+#pragma once
 
 /*
  * fsprg v0.1  -  (seekable) forward-secure pseudorandom generator
@@ -62,5 +60,3 @@ void FSPRG_GetKey(const void *state, void *key, size_t keylen, uint32_t idx);
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index e3ab3032cb7a5db0b6a324318e0fcd5a19eaf39d..1d7ff81df1f2131c6929016249fd75a50939b3d5 100644 (file)
@@ -11,8 +11,7 @@
  * Version:     @(#)initreq.h  1.28  31-Mar-2004 MvS
  */
 
-#ifndef _INITREQ_H
-#define _INITREQ_H
+#pragma once
 
 #include <sys/param.h>
 
@@ -72,5 +71,3 @@ struct init_request {
                 char                   data[368];
         } i;
 };
-
-#endif