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:

committed by
Atomic Bot

parent
649a4efbb8
commit
fdf82f9b14
@@ -16,8 +16,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MOUNTS_H__
|
#pragma once
|
||||||
#define __MOUNTS_H__
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BIND_READONLY = (1 << 0),
|
BIND_READONLY = (1 << 0),
|
||||||
@@ -29,5 +28,3 @@ int bind_mount (int proc_fd,
|
|||||||
const char *src,
|
const char *src,
|
||||||
const char *dest,
|
const char *dest,
|
||||||
bind_option_t options);
|
bind_option_t options);
|
||||||
|
|
||||||
#endif /* __MOUNTS_H__ */
|
|
||||||
|
@@ -16,9 +16,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __NETWORK_H__
|
#pragma once
|
||||||
#define __NETWORK_H__
|
|
||||||
|
|
||||||
int loopback_setup (void);
|
int loopback_setup (void);
|
||||||
|
|
||||||
#endif /* __NETWORK_H__ */
|
|
||||||
|
5
utils.h
5
utils.h
@@ -16,8 +16,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __UTILS_H__
|
#pragma once
|
||||||
#define __UTILS_H__
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
@@ -163,5 +162,3 @@ steal_pointer (void *pp)
|
|||||||
/* type safety */
|
/* type safety */
|
||||||
#define steal_pointer(pp) \
|
#define steal_pointer(pp) \
|
||||||
(0 ? (*(pp)) : (steal_pointer) (pp))
|
(0 ? (*(pp)) : (steal_pointer) (pp))
|
||||||
|
|
||||||
#endif /* __UTILS_H__ */
|
|
||||||
|
Reference in New Issue
Block a user