replace 'ifndef define' to 'pragam once'

This commit is contained in:
luwenpeng
2024-06-19 15:06:14 +08:00
parent c3fd452793
commit 48428e52fe
47 changed files with 47 additions and 188 deletions

View File

@@ -1,5 +1,4 @@
#ifndef _LAYER_H
#define _LAYER_H
#pragma once
#ifdef __cplusplus
extern "C"
@@ -90,5 +89,3 @@ int packet_get_layer_by_idx(const struct packet *pkt, int idx, struct layer *out
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _PACKET_H
#define _PACKET_H
#pragma once
#ifdef __cplusplus
extern "C"
@@ -43,5 +42,3 @@ uint16_t packet_get_payload_len(const struct packet *pkt);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _SESSION_PUB_H
#define _SESSION_PUB_H
#pragma once
#ifdef __cplusplus
extern "C"
@@ -150,5 +149,3 @@ void session_set_discard(struct session *sess);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _STELLAR_PUB_H
#define _STELLAR_PUB_H
#pragma once
#ifdef __cplusplus
extern "C"
@@ -63,5 +62,3 @@ int stellar_main(int argc, char **argv);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _TUNNEL_H
#define _TUNNEL_H
#pragma once
#ifdef __cplusplus
extern "C"
@@ -59,5 +58,3 @@ int packet_get_tunnel_by_idx(const struct packet *pkt, int idx, struct tunnel *o
#ifdef __cplusplus
}
#endif
#endif