pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcap/+/39267?usp=email )
Change subject: Use #pragma once in all header files
......................................................................
Use #pragma once in all header files
osmo_pcap_client.h was missing a mechanism to re-include, such as
#pragma once. While at it, change other files to use the pragma instead
of defines.
Change-Id: I35eb36898bb7a540c7b430db8021bb4c09b72da8
---
M include/osmo-pcap/osmo_pcap_client.h
M include/osmo-pcap/osmo_pcap_server.h
M include/osmo-pcap/wireformat.h
3 files changed, 3 insertions(+), 10 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h
index 250a41f..09a4674 100644
--- a/include/osmo-pcap/osmo_pcap_client.h
+++ b/include/osmo-pcap/osmo_pcap_client.h
@@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+#pragma once
#include "osmo_tls.h"
diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h
index 614ceca..bed1cb5 100644
--- a/include/osmo-pcap/osmo_pcap_server.h
+++ b/include/osmo-pcap/osmo_pcap_server.h
@@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
-#ifndef OSMO_PCAP_SERVER_H
-#define OSMO_PCAP_SERVER_H
+#pragma once
#include "wireformat.h"
#include "osmo_tls.h"
@@ -168,5 +166,3 @@
void vty_server_init(void);
void osmo_pcap_server_close_trace(struct osmo_pcap_conn *conn);
void osmo_pcap_server_close_conn(struct osmo_pcap_conn *conn);
-
-#endif
diff --git a/include/osmo-pcap/wireformat.h b/include/osmo-pcap/wireformat.h
index 54dce22..3838830 100644
--- a/include/osmo-pcap/wireformat.h
+++ b/include/osmo-pcap/wireformat.h
@@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
-#ifndef WIREFORMAT_H
-#define WIREFORMAT_H
+#pragma once
#include <inttypes.h>
#include <pcap.h>
@@ -49,5 +47,3 @@
uint32_t caplen;
uint32_t len;
} __attribute__((packed));
-
-#endif
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcap/+/39267?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I35eb36898bb7a540c7b430db8021bb4c09b72da8
Gerrit-Change-Number: 39267
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>