pespin has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/67/39267/1
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 change 39267. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I35eb36898bb7a540c7b430db8021bb4c09b72da8
Gerrit-Change-Number: 39267
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>