From 12ba778afdb797575e05284decd34cf2c27e3647 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Mon, 16 Jun 2014 10:13:40 +0200 Subject: include: Switch to #pragma once pattern Signed-off-by: Sylvain Munaut --- include/osmocom/codec/codec.h | 5 +---- include/osmocom/core/application.h | 5 +---- include/osmocom/core/backtrace.h | 5 +---- include/osmocom/core/bits.h | 5 +---- include/osmocom/core/bitvec.h | 5 +---- include/osmocom/core/conv.h | 5 +---- include/osmocom/core/crc16.h | 5 +---- include/osmocom/core/crcXXgen.h.tpl | 5 +---- include/osmocom/core/crcgen.h | 5 +---- include/osmocom/core/defs.h | 5 +---- include/osmocom/core/gsmtap.h | 5 +---- include/osmocom/core/gsmtap_util.h | 5 +---- include/osmocom/core/linuxlist.h | 6 +----- include/osmocom/core/linuxrbtree.h | 5 +---- include/osmocom/core/logging.h | 5 +---- include/osmocom/core/loggingrb.h | 5 +---- include/osmocom/core/msgb.h | 5 +---- include/osmocom/core/msgfile.h | 5 +---- include/osmocom/core/panic.h | 5 +---- include/osmocom/core/plugin.h | 5 +---- include/osmocom/core/prim.h | 5 +---- include/osmocom/core/rate_ctr.h | 4 +--- include/osmocom/core/select.h | 5 +---- include/osmocom/core/serial.h | 5 +---- include/osmocom/core/signal.h | 5 +---- include/osmocom/core/socket.h | 5 +---- include/osmocom/core/statistics.h | 5 +---- include/osmocom/core/strrb.h | 5 +---- include/osmocom/core/talloc.h | 5 +---- include/osmocom/core/timer.h | 5 +---- include/osmocom/core/timer_compat.h | 5 +---- include/osmocom/core/utils.h | 5 +---- include/osmocom/core/write_queue.h | 5 +---- include/osmocom/crypt/auth.h | 5 +---- include/osmocom/crypt/gprs_cipher.h | 5 +---- include/osmocom/gprs/gprs_bssgp.h | 5 +---- include/osmocom/gprs/gprs_bssgp_bss.h | 4 +--- include/osmocom/gprs/gprs_msgb.h | 4 +--- include/osmocom/gprs/gprs_ns.h | 5 +---- include/osmocom/gprs/gprs_ns_frgre.h | 5 +---- include/osmocom/gprs/protocol/gsm_08_16.h | 5 +---- include/osmocom/gprs/protocol/gsm_08_18.h | 5 +---- include/osmocom/gsm/a5.h | 5 +---- include/osmocom/gsm/abis_nm.h | 5 +---- include/osmocom/gsm/comp128.h | 6 +----- include/osmocom/gsm/comp128v23.h | 5 +---- include/osmocom/gsm/gan.h | 5 +---- include/osmocom/gsm/gsm0411_smc.h | 5 +---- include/osmocom/gsm/gsm0411_smr.h | 6 +----- include/osmocom/gsm/gsm0411_utils.h | 5 +---- include/osmocom/gsm/gsm0480.h | 5 +---- include/osmocom/gsm/gsm0502.h | 5 +---- include/osmocom/gsm/gsm0808.h | 5 +---- include/osmocom/gsm/gsm48.h | 5 +---- include/osmocom/gsm/gsm48_ie.h | 5 +---- include/osmocom/gsm/gsm_utils.h | 6 +----- include/osmocom/gsm/l1sap.h | 5 +---- include/osmocom/gsm/lapd_core.h | 5 +---- include/osmocom/gsm/lapdm.h | 5 +---- include/osmocom/gsm/meas_rep.h | 5 +---- include/osmocom/gsm/mncc.h | 5 +---- include/osmocom/gsm/prim.h | 5 +---- include/osmocom/gsm/protocol/gsm_03_41.h | 5 +---- include/osmocom/gsm/protocol/gsm_04_08.h | 5 +---- include/osmocom/gsm/protocol/gsm_04_11.h | 5 +---- include/osmocom/gsm/protocol/gsm_04_12.h | 5 +---- include/osmocom/gsm/protocol/gsm_04_80.h | 5 +---- include/osmocom/gsm/protocol/gsm_08_08.h | 5 +---- include/osmocom/gsm/protocol/gsm_08_58.h | 5 +---- include/osmocom/gsm/protocol/gsm_12_21.h | 5 +---- include/osmocom/gsm/protocol/gsm_44_318.h | 4 +--- include/osmocom/gsm/protocol/ipaccess.h | 5 +---- include/osmocom/gsm/protocol/smpp34_osmocom.h | 5 +---- include/osmocom/gsm/rsl.h | 5 +---- include/osmocom/gsm/rxlev_stat.h | 5 +---- include/osmocom/gsm/sysinfo.h | 5 +---- include/osmocom/gsm/tlv.h | 5 +---- include/osmocom/vty/buffer.h | 5 +---- include/osmocom/vty/command.h | 4 +--- include/osmocom/vty/logging.h | 5 +---- include/osmocom/vty/misc.h | 5 +---- include/osmocom/vty/telnet_interface.h | 5 +---- include/osmocom/vty/vector.h | 5 +---- include/osmocom/vty/vty.h | 5 +---- 84 files changed, 84 insertions(+), 335 deletions(-) (limited to 'include') diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 81f5d4ba..d126e0f7 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCOM_CODEC_H -#define _OSMOCOM_CODEC_H +#pragma once #include @@ -16,5 +15,3 @@ extern const uint16_t gsm690_6_7_bitorder[]; /* AMR 6.7 kbits */ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ - -#endif /* _OSMOCOM_CODEC_H */ diff --git a/include/osmocom/core/application.h b/include/osmocom/core/application.h index 34571698..ecaeaa8a 100644 --- a/include/osmocom/core/application.h +++ b/include/osmocom/core/application.h @@ -1,5 +1,4 @@ -#ifndef OSMO_APPLICATION_H -#define OSMO_APPLICATION_H +#pragma once /*! * \file application.h @@ -19,5 +18,3 @@ void osmo_init_ignore_signals(void); int osmo_init_logging(const struct log_info *); int osmo_daemonize(void); - -#endif diff --git a/include/osmocom/core/backtrace.h b/include/osmocom/core/backtrace.h index a24290c5..0c9b6ef9 100644 --- a/include/osmocom/core/backtrace.h +++ b/include/osmocom/core/backtrace.h @@ -1,7 +1,4 @@ -#ifndef _OSMO_BACKTRACE_H_ -#define _OSMO_BACKTRACE_H_ +#pragma once void osmo_generate_backtrace(void); void osmo_log_backtrace(int subsys, int level); - -#endif diff --git a/include/osmocom/core/bits.h b/include/osmocom/core/bits.h index 4c685321..d4ab5056 100644 --- a/include/osmocom/core/bits.h +++ b/include/osmocom/core/bits.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_BITS_H -#define _OSMO_BITS_H +#pragma once #include @@ -74,5 +73,3 @@ uint32_t osmo_revbytebits_8(uint8_t x); void osmo_revbytebits_buf(uint8_t *buf, int len); /*! @} */ - -#endif /* _OSMO_BITS_H */ diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 9c000d02..31382260 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -1,5 +1,4 @@ -#ifndef _BITVEC_H -#define _BITVEC_H +#pragma once /* bit vector utility routines */ @@ -66,5 +65,3 @@ int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit); /*! @} */ - -#endif /* _BITVEC_H */ diff --git a/include/osmocom/core/conv.h b/include/osmocom/core/conv.h index 4cc791fa..e7f6bd6a 100644 --- a/include/osmocom/core/conv.h +++ b/include/osmocom/core/conv.h @@ -28,8 +28,7 @@ * Osmocom convolutional encoder and decoder */ -#ifndef __OSMO_CONV_H__ -#define __OSMO_CONV_H__ +#pragma once #include @@ -142,5 +141,3 @@ int osmo_conv_decode(const struct osmo_conv_code *code, /*! @} */ - -#endif /* __OSMO_CONV_H__ */ diff --git a/include/osmocom/core/crc16.h b/include/osmocom/core/crc16.h index 0e524176..83b2e5f7 100644 --- a/include/osmocom/core/crc16.h +++ b/include/osmocom/core/crc16.h @@ -15,8 +15,7 @@ * Version 2. See the file COPYING for more details. */ -#ifndef __CRC16_H -#define __CRC16_H +#pragma once #include @@ -30,5 +29,3 @@ static inline uint16_t osmo_crc16_byte(uint16_t crc, const uint8_t data) { return (crc >> 8) ^ osmo_crc16_table[(crc ^ data) & 0xff]; } - -#endif /* __CRC16_H */ diff --git a/include/osmocom/core/crcXXgen.h.tpl b/include/osmocom/core/crcXXgen.h.tpl index a931bc39..164f7201 100644 --- a/include/osmocom/core/crcXXgen.h.tpl +++ b/include/osmocom/core/crcXXgen.h.tpl @@ -20,8 +20,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __OSMO_CRCXXGEN_H__ -#define __OSMO_CRCXXGEN_H__ +#pragma once /*! \addtogroup crcgen * @{ @@ -54,6 +53,4 @@ void osmo_crcXXgen_set_bits(const struct osmo_crcXXgen_code *code, /*! @} */ -#endif /* __OSMO_CRCXXGEN_H__ */ - /* vim: set syntax=c: */ diff --git a/include/osmocom/core/crcgen.h b/include/osmocom/core/crcgen.h index 69cef040..b39b55db 100644 --- a/include/osmocom/core/crcgen.h +++ b/include/osmocom/core/crcgen.h @@ -20,8 +20,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __OSMO_CRCGEN_H__ -#define __OSMO_CRCGEN_H__ +#pragma once /*! \defgroup crcgen Osmocom generic CRC routines * @{ @@ -37,5 +36,3 @@ #include /*! @} */ - -#endif /* __OSMO_CRCGEN_H__ */ diff --git a/include/osmocom/core/defs.h b/include/osmocom/core/defs.h index 5ffee046..aebe9258 100644 --- a/include/osmocom/core/defs.h +++ b/include/osmocom/core/defs.h @@ -1,5 +1,4 @@ -#ifndef OSMOCORE_DEFS_H -#define OSMOCORE_DEFS_H +#pragma once /*! \defgroup utils General-purpose utility functions * @{ @@ -46,5 +45,3 @@ #undef _OSMO_HAS_ATTRIBUTE_DEPRECATED /*! @} */ - -#endif diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index 4694219a..69bd108e 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -1,5 +1,4 @@ -#ifndef _GSMTAP_H -#define _GSMTAP_H +#pragma once /* gsmtap header, pseudo-header in front of the actua GSM payload */ @@ -239,5 +238,3 @@ struct gsmtap_hdr { uint8_t res; /* reserved for future use (RFU) */ } __attribute__((packed)); - -#endif /* _GSMTAP_H */ diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h index eaa32a00..a5c03e77 100644 --- a/include/osmocom/core/gsmtap_util.h +++ b/include/osmocom/core/gsmtap_util.h @@ -1,5 +1,4 @@ -#ifndef _GSMTAP_UTIL_H -#define _GSMTAP_UTIL_H +#pragma once #include #include @@ -55,5 +54,3 @@ int gsmtap_send(struct gsmtap_inst *gti, uint16_t arfcn, uint8_t ts, unsigned int len); /*! @} */ - -#endif /* _GSMTAP_UTIL_H */ diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index fb99c5ec..b6841520 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -1,5 +1,4 @@ -#ifndef _LINUX_LLIST_H -#define _LINUX_LLIST_H +#pragma once #include @@ -355,6 +354,3 @@ static inline void llist_splice_init(struct llist_head *llist, #define llist_for_each_continue_rcu(pos, head) \ for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next)) - - -#endif diff --git a/include/osmocom/core/linuxrbtree.h b/include/osmocom/core/linuxrbtree.h index 079f440d..ef8bc153 100644 --- a/include/osmocom/core/linuxrbtree.h +++ b/include/osmocom/core/linuxrbtree.h @@ -91,8 +91,7 @@ static inline struct page * rb_insert_page_cache(struct inode * inode, ----------------------------------------------------------------------- */ -#ifndef _LINUX_RBTREE_H -#define _LINUX_RBTREE_H +#pragma once #include @@ -156,5 +155,3 @@ static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, *rb_link = node; } - -#endif /* _LINUX_RBTREE_H */ diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 1d57e22c..caeea065 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_LOGGING_H -#define _OSMOCORE_LOGGING_H +#pragma once /*! \defgroup logging Osmocom logging framework * @{ @@ -216,5 +215,3 @@ struct log_target *log_target_find(int type, const char *fname); extern struct llist_head osmo_log_target_list; /*! @} */ - -#endif /* _OSMOCORE_LOGGING_H */ diff --git a/include/osmocom/core/loggingrb.h b/include/osmocom/core/loggingrb.h index a6f377b1..acdccfb9 100644 --- a/include/osmocom/core/loggingrb.h +++ b/include/osmocom/core/loggingrb.h @@ -1,5 +1,4 @@ -#ifndef _LOGGINGRB_H -#define _LOGGINGRB_H +#pragma once /* (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved @@ -36,5 +35,3 @@ const char *log_target_rb_get(struct log_target const *target, size_t logindex); struct log_target *log_target_create_rb(size_t size); /*! @} */ - -#endif /* _LOGGINGRB_H */ diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index 33e8081f..bf83d677 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -1,5 +1,4 @@ -#ifndef _MSGB_H -#define _MSGB_H +#pragma once /* (C) 2008 by Harald Welte * All Rights Reserved @@ -413,5 +412,3 @@ uint8_t *msgb_data(const struct msgb *msg); void msgb_set_talloc_ctx(void *ctx); /*! @} */ - -#endif /* _MSGB_H */ diff --git a/include/osmocom/core/msgfile.h b/include/osmocom/core/msgfile.h index c5e67a45..cab97b22 100644 --- a/include/osmocom/core/msgfile.h +++ b/include/osmocom/core/msgfile.h @@ -19,8 +19,7 @@ * */ -#ifndef MSG_FILE_H -#define MSG_FILE_H +#pragma once #include @@ -45,5 +44,3 @@ struct osmo_config_list { }; struct osmo_config_list* osmo_config_list_parse(void *ctx, const char *filename); - -#endif diff --git a/include/osmocom/core/panic.h b/include/osmocom/core/panic.h index fd5cf208..5d575c4b 100644 --- a/include/osmocom/core/panic.h +++ b/include/osmocom/core/panic.h @@ -1,5 +1,4 @@ -#ifndef OSMOCORE_PANIC_H -#define OSMOCORE_PANIC_H +#pragma once /*! \addtogroup utils * @{ @@ -16,5 +15,3 @@ extern void osmo_panic(const char *fmt, ...); extern void osmo_set_panic_handler(osmo_panic_handler_t h); /*! @} */ - -#endif /* OSMOCORE_PANIC_H */ diff --git a/include/osmocom/core/plugin.h b/include/osmocom/core/plugin.h index 6c0eccc6..aef1dfc9 100644 --- a/include/osmocom/core/plugin.h +++ b/include/osmocom/core/plugin.h @@ -1,6 +1,3 @@ -#ifndef _OSMO_PLUGIN_H -#define _OSMO_PLUGIN_H +#pragma once int osmo_plugin_load_all(const char *directory); - -#endif diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h index f61d8084..935ce51a 100644 --- a/include/osmocom/core/prim.h +++ b/include/osmocom/core/prim.h @@ -1,5 +1,4 @@ -#ifndef OSMO_PRIMITIVE_H -#define OSMO_PRIMITIVE_H +#pragma once /*! \defgroup prim Osmocom primitives * @{ @@ -56,5 +55,3 @@ osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap, typedef int (*osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx); /*! @} */ - -#endif /* OSMO_PRIMITIVE_H */ diff --git a/include/osmocom/core/rate_ctr.h b/include/osmocom/core/rate_ctr.h index 24577fdf..821c7cfd 100644 --- a/include/osmocom/core/rate_ctr.h +++ b/include/osmocom/core/rate_ctr.h @@ -1,5 +1,4 @@ -#ifndef _RATE_CTR_H -#define _RATE_CTR_H +#pragma once /*! \defgroup rate_ctr Rate counters * @{ @@ -85,4 +84,3 @@ struct rate_ctr_group *rate_ctr_get_group_by_name_idx(const char *name, const un const struct rate_ctr *rate_ctr_get_by_name(const struct rate_ctr_group *ctrg, const char *name); /*! @} */ -#endif /* RATE_CTR_H */ diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h index efdd716f..b6b9e821 100644 --- a/include/osmocom/core/select.h +++ b/include/osmocom/core/select.h @@ -1,5 +1,4 @@ -#ifndef _BSC_SELECT_H -#define _BSC_SELECT_H +#pragma once #include @@ -41,5 +40,3 @@ void osmo_fd_unregister(struct osmo_fd *fd); int osmo_select_main(int polling); /*! @} */ - -#endif /* _BSC_SELECT_H */ diff --git a/include/osmocom/core/serial.h b/include/osmocom/core/serial.h index 1640a6da..e3f7a9ff 100644 --- a/include/osmocom/core/serial.h +++ b/include/osmocom/core/serial.h @@ -28,8 +28,7 @@ * Osmocom serial port helpers */ -#ifndef __OSMO_SERIAL_H__ -#define __OSMO_SERIAL_H__ +#pragma once #include @@ -39,5 +38,3 @@ int osmo_serial_set_custom_baudrate(int fd, int baudrate); int osmo_serial_clear_custom_baudrate(int fd); /*! @} */ - -#endif /* __OSMO_SERIAL_H__ */ diff --git a/include/osmocom/core/signal.h b/include/osmocom/core/signal.h index 19a2688f..6f56496a 100644 --- a/include/osmocom/core/signal.h +++ b/include/osmocom/core/signal.h @@ -1,5 +1,4 @@ -#ifndef OSMO_SIGNAL_H -#define OSMO_SIGNAL_H +#pragma once #include @@ -43,5 +42,3 @@ void osmo_signal_unregister_handler(unsigned int subsys, osmo_signal_cbfn *cbfn, void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data); /*! @} */ - -#endif /* OSMO_SIGNAL_H */ diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index cb1b7a82..1df28c92 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_SOCKET_H -#define _OSMOCORE_SOCKET_H +#pragma once /*! \defgroup socket Socket convenience functions * @{ @@ -37,5 +36,3 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags); /*! @} */ - -#endif /* _OSMOCORE_SOCKET_H */ diff --git a/include/osmocom/core/statistics.h b/include/osmocom/core/statistics.h index ade00748..de250bec 100644 --- a/include/osmocom/core/statistics.h +++ b/include/osmocom/core/statistics.h @@ -1,5 +1,4 @@ -#ifndef _STATISTICS_H -#define _STATISTICS_H +#pragma once /*! \file statistics.h * \brief Common routines regarding statistics */ @@ -49,5 +48,3 @@ int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), * \returns pointer to counter (\ref osmo_counter) or NULL otherwise */ struct osmo_counter *osmo_counter_get_by_name(const char *name); - -#endif /* _STATISTICS_H */ diff --git a/include/osmocom/core/strrb.h b/include/osmocom/core/strrb.h index cfc56dc0..c563d1b9 100644 --- a/include/osmocom/core/strrb.h +++ b/include/osmocom/core/strrb.h @@ -1,5 +1,4 @@ -#ifndef _STRRB_H -#define _STRRB_H +#pragma once /* (C) 2012-2013 by Katerina Barone-Adesi * All Rights Reserved @@ -54,5 +53,3 @@ size_t osmo_strrb_elements(const struct osmo_strrb *rb); int osmo_strrb_add(struct osmo_strrb *rb, const char *data); /*! @} */ - -#endif /* _STRRB_H */ diff --git a/include/osmocom/core/talloc.h b/include/osmocom/core/talloc.h index f7f7643b..dde102b2 100644 --- a/include/osmocom/core/talloc.h +++ b/include/osmocom/core/talloc.h @@ -1,5 +1,4 @@ -#ifndef _TALLOC_H_ -#define _TALLOC_H_ +#pragma once /* Unix SMB/CIFS implementation. Samba temporary memory allocation functions @@ -188,5 +187,3 @@ char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3 char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); void talloc_set_abort_fn(void (*abort_fn)(const char *reason)); - -#endif diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h index d37af806..d7343576 100644 --- a/include/osmocom/core/timer.h +++ b/include/osmocom/core/timer.h @@ -26,8 +26,7 @@ * \brief Osmocom timer handling routines */ -#ifndef TIMER_H -#define TIMER_H +#pragma once #include @@ -85,5 +84,3 @@ int osmo_timers_update(void); int osmo_timers_check(void); /*! @} */ - -#endif diff --git a/include/osmocom/core/timer_compat.h b/include/osmocom/core/timer_compat.h index d86c109e..fb2967ba 100644 --- a/include/osmocom/core/timer_compat.h +++ b/include/osmocom/core/timer_compat.h @@ -26,8 +26,7 @@ * \brief Compatibility header with some helpers */ -#ifndef TIMER_COMPAT_H -#define TIMER_COMPAT_H +#pragma once /* Convenience macros for operations on timevals. @@ -75,5 +74,3 @@ /*! @} */ - -#endif /* TIMER_COMPAT_H */ diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 2333de66..c08e7753 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -1,5 +1,4 @@ -#ifndef OSMOCORE_UTIL_H -#define OSMOCORE_UTIL_H +#pragma once #include @@ -62,5 +61,3 @@ do { \ /*! @} */ - -#endif diff --git a/include/osmocom/core/write_queue.h b/include/osmocom/core/write_queue.h index 816c0364..4e0fdf3d 100644 --- a/include/osmocom/core/write_queue.h +++ b/include/osmocom/core/write_queue.h @@ -20,8 +20,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ -#ifndef OSMO_WQUEUE_H -#define OSMO_WQUEUE_H +#pragma once /*! \defgroup write_queue Osmocom msgb write queues * @{ @@ -59,5 +58,3 @@ int osmo_wqueue_enqueue(struct osmo_wqueue *queue, struct msgb *data); int osmo_wqueue_bfd_cb(struct osmo_fd *fd, unsigned int what); /*! @} */ - -#endif diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 871e7c87..bed48e78 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCRYPTO_AUTH_H -#define _OSMOCRYPTO_AUTH_H +#pragma once /*! \addtogroup auth * @{ @@ -96,6 +95,4 @@ int osmo_auth_supported(enum osmo_auth_algo algo); const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); -#endif /* _OSMOCRYPTO_AUTH_H */ - /* @} */ diff --git a/include/osmocom/crypt/gprs_cipher.h b/include/osmocom/crypt/gprs_cipher.h index 30510711..940b07b1 100644 --- a/include/osmocom/crypt/gprs_cipher.h +++ b/include/osmocom/crypt/gprs_cipher.h @@ -1,5 +1,4 @@ -#ifndef _GPRS_CIPHER_H -#define _GPRS_CIPHER_H +#pragma once #include @@ -50,5 +49,3 @@ uint32_t gprs_cipher_gen_input_ui(uint32_t iov_ui, uint8_t sapi, uint32_t lfn, u /* GSM TS 04.64 / Section A.2.1 : Generation of 'input' */ uint32_t gprs_cipher_gen_input_i(uint32_t iov_i, uint32_t lfn, uint32_t oc); - -#endif /* _GPRS_CIPHER_H */ diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h index eb4e7219..f2292535 100644 --- a/include/osmocom/gprs/gprs_bssgp.h +++ b/include/osmocom/gprs/gprs_bssgp.h @@ -1,5 +1,4 @@ -#ifndef _GPRS_BSSGP_H -#define _GPRS_BSSGP_H +#pragma once #include #include @@ -207,5 +206,3 @@ int bssgp_vty_init(void); void bssgp_set_log_ss(int ss); int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx); - -#endif /* _GPRS_BSSGP_H */ diff --git a/include/osmocom/gprs/gprs_bssgp_bss.h b/include/osmocom/gprs/gprs_bssgp_bss.h index f34281e3..9e0cb66b 100644 --- a/include/osmocom/gprs/gprs_bssgp_bss.h +++ b/include/osmocom/gprs/gprs_bssgp_bss.h @@ -1,5 +1,4 @@ -#ifndef _BSSGP_BSS_H -#define _BSSGP_BSS_H +#pragma once #include #include @@ -72,4 +71,3 @@ int bssgp_tx_fc_bvc(struct bssgp_bvc_ctx *bctx, uint8_t tag, int bssgp_tx_fc_ms(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag, uint32_t ms_bucket_size, uint32_t bucket_leak_rate, uint8_t *bucket_full_ratio); -#endif diff --git a/include/osmocom/gprs/gprs_msgb.h b/include/osmocom/gprs/gprs_msgb.h index e277696b..06f5cca2 100644 --- a/include/osmocom/gprs/gprs_msgb.h +++ b/include/osmocom/gprs/gprs_msgb.h @@ -1,5 +1,4 @@ -#ifndef _LIBGB_MSGB_H -#define _LIBGB_MSGB_H +#pragma once #include /* the data structure stored in msgb->cb for libgb apps */ @@ -34,4 +33,3 @@ struct libgb_msgb_cb { #include int gprs_log_filter_fn(const struct log_context *ctx, struct log_target *tar); -#endif diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index 296800e4..b4af61bb 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -1,5 +1,4 @@ -#ifndef _GPRS_NS_H -#define _GPRS_NS_H +#pragma once #include @@ -215,5 +214,3 @@ struct ns_signal_data { void gprs_ns_set_log_ss(int ss); /*! }@ */ - -#endif diff --git a/include/osmocom/gprs/gprs_ns_frgre.h b/include/osmocom/gprs/gprs_ns_frgre.h index abcd43ff..72ef7d19 100644 --- a/include/osmocom/gprs/gprs_ns_frgre.h +++ b/include/osmocom/gprs/gprs_ns_frgre.h @@ -1,6 +1,3 @@ -#ifndef _GPRS_NS_FRGRE_H -#define _GPRS_NS_FRGRE_H +#pragma once int gprs_ns_frgre_sendmsg(struct gprs_nsvc *nsvc, struct msgb *msg); - -#endif diff --git a/include/osmocom/gprs/protocol/gsm_08_16.h b/include/osmocom/gprs/protocol/gsm_08_16.h index 4c3eda32..8b2ac564 100644 --- a/include/osmocom/gprs/protocol/gsm_08_16.h +++ b/include/osmocom/gprs/protocol/gsm_08_16.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_08_16_H -#define _OSMO_08_16_H +#pragma once /* GPRS Networks Service (NS) messages on the Gb interface * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) @@ -81,5 +80,3 @@ enum ns_cause { NS_CAUSE_UNKN_IP_ADDR = 0x13, NS_CAUSE_UNKN_IP_TEST_FAILED = 0x14, }; - -#endif diff --git a/include/osmocom/gprs/protocol/gsm_08_18.h b/include/osmocom/gprs/protocol/gsm_08_18.h index 3a351eaa..529e9889 100644 --- a/include/osmocom/gprs/protocol/gsm_08_18.h +++ b/include/osmocom/gprs/protocol/gsm_08_18.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_08_18_H -#define _OSMO_08_18_H +#pragma once #include @@ -140,5 +139,3 @@ enum gprs_bssgp_cause { BSSGP_CAUSE_PROTO_ERR_UNSPEC = 0x27, BSSGP_CAUSE_PDU_INCOMP_FEAT = 0x28, }; - -#endif diff --git a/include/osmocom/gsm/a5.h b/include/osmocom/gsm/a5.h index 2f78a92b..c0767346 100644 --- a/include/osmocom/gsm/a5.h +++ b/include/osmocom/gsm/a5.h @@ -20,8 +20,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __OSMO_A5_H__ -#define __OSMO_A5_H__ +#pragma once #include @@ -59,5 +58,3 @@ void osmo_a5_1(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul); void osmo_a5_2(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul); /*! @} */ - -#endif /* __OSMO_A5_H__ */ diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index 86b97eb5..bc13ffe0 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_GSM_ABIS_NM_H -#define _OSMO_GSM_ABIS_NM_H +#pragma once /*! \defgroup oml A-bis OML * @{ @@ -47,5 +46,3 @@ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan); enum gsm_phys_chan_config abis_nm_pchan4chcomb(uint8_t chcomb); /*! @} */ - -#endif /* _OSMO_GSM_ABIS_NM_H */ diff --git a/include/osmocom/gsm/comp128.h b/include/osmocom/gsm/comp128.h index e4587d4f..33b997aa 100644 --- a/include/osmocom/gsm/comp128.h +++ b/include/osmocom/gsm/comp128.h @@ -4,8 +4,7 @@ * See comp128.c for details */ -#ifndef __COMP128_H__ -#define __COMP128_H__ +#pragma once #include @@ -17,6 +16,3 @@ * kc : uint8_t [8] */ void comp128(const uint8_t *ki, const uint8_t *srand, uint8_t *sres, uint8_t *kc); - -#endif /* __COMP128_H__ */ - diff --git a/include/osmocom/gsm/comp128v23.h b/include/osmocom/gsm/comp128v23.h index bebeb597..31d39335 100644 --- a/include/osmocom/gsm/comp128v23.h +++ b/include/osmocom/gsm/comp128v23.h @@ -4,8 +4,7 @@ * See comp128v23.c for details */ -#ifndef __COMP128V23_H__ -#define __COMP128V23_H__ +#pragma once #include @@ -19,5 +18,3 @@ */ int comp128v2(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc); int comp128v3(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc); - -#endif /* __COMP128V23_H__ */ diff --git a/include/osmocom/gsm/gan.h b/include/osmocom/gsm/gan.h index ab4c1e4e..6f2b5351 100644 --- a/include/osmocom/gsm/gan.h +++ b/include/osmocom/gsm/gan.h @@ -1,9 +1,6 @@ -#ifndef _OSMO_GSM_GAN_H -#define _OSMO_GSM_GAN_H +#pragma once #include extern const struct value_string gan_msgt_vals[]; static const struct value_string gan_pdisc_vals[]; - -#endif diff --git a/include/osmocom/gsm/gsm0411_smc.h b/include/osmocom/gsm/gsm0411_smc.h index 239ee13c..89964fa1 100644 --- a/include/osmocom/gsm/gsm0411_smc.h +++ b/include/osmocom/gsm/gsm0411_smc.h @@ -1,5 +1,4 @@ -#ifndef _GSM0411_SMC_H -#define _GSM0411_SMC_H +#pragma once #include #include @@ -60,5 +59,3 @@ int gsm411_smc_send(struct gsm411_smc_inst *inst, int msg_type, /* message from lower layer */ int gsm411_smc_recv(struct gsm411_smc_inst *inst, int msg_type, struct msgb *msg, int cp_msg_type); - -#endif /* _GSM0411_SMC_H */ diff --git a/include/osmocom/gsm/gsm0411_smr.h b/include/osmocom/gsm/gsm0411_smr.h index b0614924..bc908a75 100644 --- a/include/osmocom/gsm/gsm0411_smr.h +++ b/include/osmocom/gsm/gsm0411_smr.h @@ -1,5 +1,4 @@ -#ifndef _GSM0411_SMR_H -#define _GSM0411_SMR_H +#pragma once #include @@ -41,6 +40,3 @@ int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type, /* message from lower layer */ int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type, struct msgb *msg); - -#endif /* _GSM0411_SMR_H */ - diff --git a/include/osmocom/gsm/gsm0411_utils.h b/include/osmocom/gsm/gsm0411_utils.h index ad368e67..70050105 100644 --- a/include/osmocom/gsm/gsm0411_utils.h +++ b/include/osmocom/gsm/gsm0411_utils.h @@ -1,5 +1,4 @@ -#ifndef _GSM0411_UTILS_H -#define _GSM0411_UTILS_H +#pragma once #include @@ -34,5 +33,3 @@ int gsm411_push_rp_header(struct msgb *msg, uint8_t rp_msg_type, /* Prefix msg with a 04.08/04.11 CP header */ int gsm411_push_cp_header(struct msgb *msg, uint8_t proto, uint8_t trans, uint8_t msg_type); - -#endif /* _GSM0411_UTILS_H */ diff --git a/include/osmocom/gsm/gsm0480.h b/include/osmocom/gsm/gsm0480.h index d6626d60..b1281629 100644 --- a/include/osmocom/gsm/gsm0480.h +++ b/include/osmocom/gsm/gsm0480.h @@ -1,5 +1,4 @@ -#ifndef gsm0480_h -#define gsm0480_h +#pragma once #include #include @@ -22,5 +21,3 @@ struct msgb *gsm0480_create_notifySS(const char *text); int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id); int gsm0480_wrap_facility(struct msgb *msg); - -#endif diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h index 46b629e4..6ee5a600 100644 --- a/include/osmocom/gsm/gsm0502.h +++ b/include/osmocom/gsm/gsm0502.h @@ -1,5 +1,4 @@ -#ifndef OSMOCOM_GSM_0502_H -#define OSMOCOM_GSM_0502_H +#pragma once #include @@ -34,5 +33,3 @@ gsm0502_get_paging_group(uint64_t imsi, unsigned int bs_cc_chans, unsigned int gsm0502_calc_paging_group(struct gsm48_control_channel_descr *chan_desc, uint64_t imsi); - -#endif diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 5127c003..a7e102c6 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -17,8 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ -#ifndef OSMOCORE_GSM0808_H -#define OSMOCORE_GSM0808_H +#pragma once #include "tlv.h" @@ -47,5 +46,3 @@ const struct tlv_definition *gsm0808_att_tlvdef(void); const char *gsm0808_bssmap_name(uint8_t msg_type); const char *gsm0808_bssap_name(uint8_t msg_type); - -#endif diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index 1e7498a9..151b14e7 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_GSM48_H -#define _OSMOCORE_GSM48_H +#pragma once #include #include @@ -36,5 +35,3 @@ void gsm48_parse_ra(struct gprs_ra_id *raid, const uint8_t *buf); int gsm48_construct_ra(uint8_t *buf, const struct gprs_ra_id *raid); int gsm48_number_of_paging_subchannels(struct gsm48_control_channel_descr *chan_desc); - -#endif diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h index f4fce25c..84454865 100644 --- a/include/osmocom/gsm/gsm48_ie.h +++ b/include/osmocom/gsm/gsm48_ie.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_GSM48_IE_H -#define _OSMOCORE_GSM48_IE_H +#pragma once #include #include @@ -113,5 +112,3 @@ struct gsm_sysinfo_freq { /* decode "Cell Channel Description" (10.5.2.1b) and other frequency lists */ int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, uint8_t *cd, uint8_t len, uint8_t mask, uint8_t frqt); - -#endif diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 02bfe4cb..6eab7acb 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -22,8 +22,7 @@ * */ -#ifndef GSM_UTILS_H -#define GSM_UTILS_H +#pragma once #include #include @@ -203,6 +202,3 @@ int gsm_7bit_decode_ussd(char *decoded, const uint8_t *user_data, uint8_t length int gsm_7bit_encode(uint8_t *result, const char *data) OSMO_DEPRECATED("Use gsm_7bit_encode_n() instead"); int gsm_7bit_encode_ussd(uint8_t *result, const char *data, int *octets_written) OSMO_DEPRECATED("Use gsm_7bit_encode_n_ussd() instead"); int gsm_7bit_encode_oct(uint8_t *result, const char *data, int *octets_written) OSMO_DEPRECATED("Use gsm_7bit_encode_n() instead"); - - -#endif diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h index c21abe5e..9f3fe98c 100644 --- a/include/osmocom/gsm/l1sap.h +++ b/include/osmocom/gsm/l1sap.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCOM_L1SAP_H -#define _OSMOCOM_L1SAP_H +#pragma once #include @@ -121,5 +120,3 @@ struct osmo_phsap_prim { struct mph_info_param info; } u; /*!< \brief request-specific data */ }; - -#endif /* _OSMOCOM_L1SAP_H */ diff --git a/include/osmocom/gsm/lapd_core.h b/include/osmocom/gsm/lapd_core.h index f88fb112..42ef417e 100644 --- a/include/osmocom/gsm/lapd_core.h +++ b/include/osmocom/gsm/lapd_core.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCOM_LAPD_H -#define _OSMOCOM_LAPD_H +#pragma once #include @@ -170,5 +169,3 @@ int lapd_ph_data_ind(struct msgb *msg, struct lapd_msg_ctx *lctx); int lapd_recv_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx); /*! @} */ - -#endif /* _OSMOCOM_LAPD_H */ diff --git a/include/osmocom/gsm/lapdm.h b/include/osmocom/gsm/lapdm.h index 93934068..84d109d5 100644 --- a/include/osmocom/gsm/lapdm.h +++ b/include/osmocom/gsm/lapdm.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCOM_LAPDM_H -#define _OSMOCOM_LAPDM_H +#pragma once #include #include @@ -112,5 +111,3 @@ void lapdm_channel_set_flags(struct lapdm_channel *lc, unsigned int flags); int lapdm_phsap_dequeue_prim(struct lapdm_entity *le, struct osmo_phsap_prim *pp); /*! @} */ - -#endif /* _OSMOCOM_LAPDM_H */ diff --git a/include/osmocom/gsm/meas_rep.h b/include/osmocom/gsm/meas_rep.h index bd24bbed..09c2c4f2 100644 --- a/include/osmocom/gsm/meas_rep.h +++ b/include/osmocom/gsm/meas_rep.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_MEAS_REP_H -#define _OSMO_MEAS_REP_H +#pragma once #include @@ -25,5 +24,3 @@ enum meas_rep_field { MEAS_REP_UL_RXQUAL_FULL, MEAS_REP_UL_RXQUAL_SUB, }; - -#endif diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h index a51267e0..171db7ab 100644 --- a/include/osmocom/gsm/mncc.h +++ b/include/osmocom/gsm/mncc.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_MNCC_H -#define _OSMOCORE_MNCC_H +#pragma once #include @@ -81,5 +80,3 @@ enum { GSM_MNCC_BCAP_OTHER_ITC = 5, GSM_MNCC_BCAP_RESERVED = 7, }; - -#endif diff --git a/include/osmocom/gsm/prim.h b/include/osmocom/gsm/prim.h index 5beb2007..5f61dc7c 100644 --- a/include/osmocom/gsm/prim.h +++ b/include/osmocom/gsm/prim.h @@ -1,5 +1,4 @@ -#ifndef OSMO_GSM_PRIM_H -#define OSMO_GSM_PRIM_H +#pragma once #include @@ -14,5 +13,3 @@ enum osmo_gsm_sap { SAP_BSSGP_NM, SAP_BSSGP_PFM, }; - -#endif diff --git a/include/osmocom/gsm/protocol/gsm_03_41.h b/include/osmocom/gsm/protocol/gsm_03_41.h index 54365cbc..b6efb5e9 100644 --- a/include/osmocom/gsm/protocol/gsm_03_41.h +++ b/include/osmocom/gsm/protocol/gsm_03_41.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_03_41_H -#define PROTO_GSM_03_41_H +#pragma once #include @@ -47,5 +46,3 @@ struct gsm341_etws_message { #define GSM341_GS_PLMN_WIDE 1 #define GSM341_GS_LA_WIDE 2 #define GSM341_GS_CELL_WIDE 3 - -#endif /* PROTO_GSM_03_41_H */ diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 8fa5d9a1..9fcdddc2 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_04_08_H -#define PROTO_GSM_04_08_H +#pragma once #include @@ -1336,5 +1335,3 @@ struct gsm48_ra_id { #define GSM_MACBLOCK_LEN 23 #define GSM_MACBLOCK_PADDING 0x2b - -#endif /* PROTO_GSM_04_08_H */ diff --git a/include/osmocom/gsm/protocol/gsm_04_11.h b/include/osmocom/gsm/protocol/gsm_04_11.h index 38dd5536..651adcaa 100644 --- a/include/osmocom/gsm/protocol/gsm_04_11.h +++ b/include/osmocom/gsm/protocol/gsm_04_11.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_04_11_H -#define PROTO_GSM_04_11_H +#pragma once #include @@ -186,5 +185,3 @@ enum sms_alphabet { #define GSM338_DCS_1111_CLASS1_ME 1 #define GSM338_DCS_1111_CLASS2_SIM 2 #define GSM338_DCS_1111_CLASS3_TE 3 /* See TS 07.05 */ - -#endif /* PROTO_GSM_04_11_H */ diff --git a/include/osmocom/gsm/protocol/gsm_04_12.h b/include/osmocom/gsm/protocol/gsm_04_12.h index 9b1538a5..aa40648c 100644 --- a/include/osmocom/gsm/protocol/gsm_04_12.h +++ b/include/osmocom/gsm/protocol/gsm_04_12.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_04_12_H -#define PROTO_GSM_04_12_H +#pragma once #include @@ -27,5 +26,3 @@ struct gsm412_sched_msg { uint8_t cbsms_msg_map[6]; uint8_t data[0]; } __attribute__((packed)); - -#endif diff --git a/include/osmocom/gsm/protocol/gsm_04_80.h b/include/osmocom/gsm/protocol/gsm_04_80.h index fa5c9451..2aebb46e 100644 --- a/include/osmocom/gsm/protocol/gsm_04_80.h +++ b/include/osmocom/gsm/protocol/gsm_04_80.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_04_80_H -#define PROTO_GSM_04_80_H +#pragma once /* GSM TS 04.80 definitions (Supplementary Services Specification, Formats and Coding) */ @@ -122,5 +121,3 @@ #define ASN1_PRINTABLE_STRING_TAG 0x13 #define ASN1_IA5_STRING_TAG 0x16 #define ASN1_UNICODE_STRING_TAG 0x1E - -#endif /* PROTO_GSM_04_80_H */ diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index 6b8f9359..bf408eb6 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -1,7 +1,6 @@ /* From GSM08.08 */ -#ifndef GSM_0808_H -#define GSM_0808_H +#pragma once #include @@ -299,5 +298,3 @@ enum gsm0808_permitted_speech { GSM0808_PERM_HR2 = GSM0808_PERM_FR2 | 0x4, GSM0808_PERM_HR3 = GSM0808_PERM_FR3 | 0x4, }; - -#endif diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index 89aafb87..3f01a926 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_08_58_H -#define PROTO_GSM_08_58_H +#pragma once /* GSM Radio Signalling Link messages on the A-bis interface * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */ @@ -579,5 +578,3 @@ enum rsl_rel_mode { }; /*! @} */ - -#endif /* PROTO_GSM_08_58_H */ diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index ad0890c7..4e8e72b9 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_12_21_H -#define PROTO_GSM_12_21_H +#pragma once /* GSM Network Management messages on the A-bis interface * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */ @@ -748,5 +747,3 @@ enum ipac_bcch_info_type { }; /*! @} */ - -#endif /* PROTO_GSM_12_21_H */ diff --git a/include/osmocom/gsm/protocol/gsm_44_318.h b/include/osmocom/gsm/protocol/gsm_44_318.h index cd5ec05a..5d7f8787 100644 --- a/include/osmocom/gsm/protocol/gsm_44_318.h +++ b/include/osmocom/gsm/protocol/gsm_44_318.h @@ -1,5 +1,4 @@ -#ifndef PROTO_GSM_44_318_H -#define PROTO_GSM_44_318_H +#pragma once #include @@ -197,4 +196,3 @@ struct gan_cch_desc_ie { #endif uint8_t access_class[2]; } __attribute__((packed)); -#endif /* PROTO_GSM_44_318_H */ diff --git a/include/osmocom/gsm/protocol/ipaccess.h b/include/osmocom/gsm/protocol/ipaccess.h index 5d98a21f..254c2bcd 100644 --- a/include/osmocom/gsm/protocol/ipaccess.h +++ b/include/osmocom/gsm/protocol/ipaccess.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_PROTO_IPACCESS_H -#define _OSMO_PROTO_IPACCESS_H +#pragma once #include @@ -90,5 +89,3 @@ struct sdp_header_entry { uint32_t addr2; uint32_t start; } __attribute__((packed)); - -#endif /* _OSMO_PROTO_IPACCESS_H */ diff --git a/include/osmocom/gsm/protocol/smpp34_osmocom.h b/include/osmocom/gsm/protocol/smpp34_osmocom.h index 20e9206e..cff6adba 100644 --- a/include/osmocom/gsm/protocol/smpp34_osmocom.h +++ b/include/osmocom/gsm/protocol/smpp34_osmocom.h @@ -1,5 +1,4 @@ -#ifndef _SMPP34_OSMOCOM_H -#define _SMPP34_OSMOCOM_H +#pragma once /* Osmocom SMPP extensions */ /* Osmocom specific new TLV definitions */ @@ -44,5 +43,3 @@ * TLVID_osmo_rxqual_dl * TLVID_osmo_imei */ - -#endif diff --git a/include/osmocom/gsm/rsl.h b/include/osmocom/gsm/rsl.h index b8e4157a..753dd191 100644 --- a/include/osmocom/gsm/rsl.h +++ b/include/osmocom/gsm/rsl.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_RSL_H -#define _OSMOCORE_RSL_H +#pragma once #include #include @@ -51,5 +50,3 @@ struct msgb *rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr, uint8_t link_id, int transparent); /*! @} */ - -#endif /* _OSMOCORE_RSL_H */ diff --git a/include/osmocom/gsm/rxlev_stat.h b/include/osmocom/gsm/rxlev_stat.h index 415509dc..7183b173 100644 --- a/include/osmocom/gsm/rxlev_stat.h +++ b/include/osmocom/gsm/rxlev_stat.h @@ -1,5 +1,4 @@ -#ifndef _OSMOCORE_RXLEV_STATS_H -#define _OSMOCORE_RXLEV_STATS_H +#pragma once #define NUM_RXLEVS 32 #define NUM_ARFCNS 1024 @@ -18,5 +17,3 @@ int16_t rxlev_stat_get_next(const struct rxlev_stats *st, uint8_t rxlev, int16_t void rxlev_stat_reset(struct rxlev_stats *st); void rxlev_stat_dump(const struct rxlev_stats *st); - -#endif /* _OSMOCORE_RXLEV_STATS_H */ diff --git a/include/osmocom/gsm/sysinfo.h b/include/osmocom/gsm/sysinfo.h index 06feb1de..7d1fe2bc 100644 --- a/include/osmocom/gsm/sysinfo.h +++ b/include/osmocom/gsm/sysinfo.h @@ -1,5 +1,4 @@ -#ifndef _OSMO_GSM_SYSINFO_H -#define _OSMO_GSM_SYSINFO_H +#pragma once #include #include @@ -39,5 +38,3 @@ extern const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE]; uint8_t osmo_sitype2rsl(enum osmo_sysinfo_type si_type); enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si); - -#endif /* _OSMO_GSM_SYSINFO_H */ diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index a70b0f9c..fda1810e 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -1,5 +1,4 @@ -#ifndef _TLV_H -#define _TLV_H +#pragma once #include #include @@ -435,5 +434,3 @@ static inline uint32_t tlvp_val32_unal(const struct tlv_parsed *tp, int pos) } /*! @} */ - -#endif /* _TLV_H */ diff --git a/include/osmocom/vty/buffer.h b/include/osmocom/vty/buffer.h index c9467a91..482a919e 100644 --- a/include/osmocom/vty/buffer.h +++ b/include/osmocom/vty/buffer.h @@ -20,8 +20,7 @@ * Boston, MA 02111-1307, USA. */ -#ifndef _ZEBRA_BUFFER_H -#define _ZEBRA_BUFFER_H +#pragma once #include @@ -98,5 +97,3 @@ extern buffer_status_t buffer_flush_all(struct buffer *, int fd); */ extern buffer_status_t buffer_flush_window(struct buffer *, int fd, int width, int height, int erase, int no_more); - -#endif /* _ZEBRA_BUFFER_H */ diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index b3b30291..3acbe78f 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -20,8 +20,7 @@ * Boston, MA 02111-1307, USA. */ -#ifndef _ZEBRA_COMMAND_H -#define _ZEBRA_COMMAND_H +#pragma once #include #include @@ -376,4 +375,3 @@ void print_version(int print_copyright); extern void *tall_vty_cmd_ctx; /*! @} */ -#endif /* _ZEBRA_COMMAND_H */ diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h index e0011bf9..9e4b98f9 100644 --- a/include/osmocom/vty/logging.h +++ b/include/osmocom/vty/logging.h @@ -1,5 +1,4 @@ -#ifndef _VTY_LOGGING_H -#define _VTY_LOGGING_H +#pragma once #define LOGGING_STR "Configure log message to this terminal\n" #define FILTER_STR "Filter log messages\n" @@ -8,5 +7,3 @@ struct log_info; void logging_vty_add_cmds(const struct log_info *cat); struct vty; struct log_target *osmo_log_vty2tgt(struct vty *vty); - -#endif /* _VTY_LOGGING_H */ diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h index db4f4a77..db552e77 100644 --- a/include/osmocom/vty/misc.h +++ b/include/osmocom/vty/misc.h @@ -1,5 +1,4 @@ -#ifndef OSMO_VTY_MISC_H -#define OSMO_VTY_MISC_H +#pragma once #include #include @@ -15,5 +14,3 @@ void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, int osmo_vty_write_config_file(const char *filename); int osmo_vty_save_config_file(void); - -#endif diff --git a/include/osmocom/vty/telnet_interface.h b/include/osmocom/vty/telnet_interface.h index 3c222014..e939ec71 100644 --- a/include/osmocom/vty/telnet_interface.h +++ b/include/osmocom/vty/telnet_interface.h @@ -18,8 +18,7 @@ * */ -#ifndef TELNET_INTERFACE_H -#define TELNET_INTERFACE_H +#pragma once #include #include @@ -52,5 +51,3 @@ int telnet_init_dynif(void *tall_ctx, void *priv, const char *ip, int port); void telnet_exit(void); /*! @} */ - -#endif /* TELNET_INTERFACE_H */ diff --git a/include/osmocom/vty/vector.h b/include/osmocom/vty/vector.h index 22a184d6..7caa5ffd 100644 --- a/include/osmocom/vty/vector.h +++ b/include/osmocom/vty/vector.h @@ -20,8 +20,7 @@ * 02111-1307, USA. */ -#ifndef _ZEBRA_VECTOR_H -#define _ZEBRA_VECTOR_H +#pragma once /* struct for vector */ struct _vector { @@ -60,5 +59,3 @@ void *vector_lookup(vector, unsigned int); void *vector_lookup_ensure(vector, unsigned int); extern void *tall_vty_vec_ctx; - -#endif /* _ZEBRA_VECTOR_H */ diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index ea987bf3..ea02e4a0 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -1,5 +1,4 @@ -#ifndef _VTY_H -#define _VTY_H +#pragma once #include #include @@ -205,5 +204,3 @@ struct vty_signal_data { }; /*! @} */ - -#endif -- cgit v1.2.3