Use #pragma once for headers

It's shorter and more reliable.  Also GCC/CLang specific, but that's
fine because that's all we support anyways.

Closes: #69

Closes: #70
Approved by: mrunalp
This commit is contained in:
Colin Walters
2016-05-18 09:41:31 -04:00
committed by Atomic Bot
parent 649a4efbb8
commit fdf82f9b14
3 changed files with 3 additions and 12 deletions

View File

@@ -16,8 +16,7 @@
*
*/
#ifndef __MOUNTS_H__
#define __MOUNTS_H__
#pragma once
typedef enum {
BIND_READONLY = (1 << 0),
@@ -29,5 +28,3 @@ int bind_mount (int proc_fd,
const char *src,
const char *dest,
bind_option_t options);
#endif /* __MOUNTS_H__ */

View File

@@ -16,9 +16,6 @@
*
*/
#ifndef __NETWORK_H__
#define __NETWORK_H__
#pragma once
int loopback_setup (void);
#endif /* __NETWORK_H__ */

View File

@@ -16,8 +16,7 @@
*
*/
#ifndef __UTILS_H__
#define __UTILS_H__
#pragma once
#include <assert.h>
#include <dirent.h>
@@ -163,5 +162,3 @@ steal_pointer (void *pp)
/* type safety */
#define steal_pointer(pp) \
(0 ? (*(pp)) : (steal_pointer) (pp))
#endif /* __UTILS_H__ */