From 48428e52fe768520e8eb0d4eae60554c54d26b5f Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Wed, 19 Jun 2024 15:06:14 +0800 Subject: replace 'ifndef define' to 'pragam once' --- include/stellar/layer.h | 5 +---- include/stellar/packet.h | 5 +---- include/stellar/session.h | 5 +---- include/stellar/stellar.h | 5 +---- include/stellar/tunnel.h | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/stellar/layer.h b/include/stellar/layer.h index 7687102..0ec9699 100644 --- a/include/stellar/layer.h +++ b/include/stellar/layer.h @@ -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 diff --git a/include/stellar/packet.h b/include/stellar/packet.h index 62b03e7..16efe2a 100644 --- a/include/stellar/packet.h +++ b/include/stellar/packet.h @@ -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 diff --git a/include/stellar/session.h b/include/stellar/session.h index 5fb58fa..d62086d 100644 --- a/include/stellar/session.h +++ b/include/stellar/session.h @@ -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 diff --git a/include/stellar/stellar.h b/include/stellar/stellar.h index 598b279..0f02132 100644 --- a/include/stellar/stellar.h +++ b/include/stellar/stellar.h @@ -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 diff --git a/include/stellar/tunnel.h b/include/stellar/tunnel.h index e51cc99..81d0526 100644 --- a/include/stellar/tunnel.h +++ b/include/stellar/tunnel.h @@ -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 -- cgit v1.2.3