diff --git a/src/Anon.h b/src/Anon.h index 68574aaf99..3f19cbd801 100644 --- a/src/Anon.h +++ b/src/Anon.h @@ -8,8 +8,7 @@ // // http://ita.ee.lbl.gov/html/contrib/tcpdpriv.html -#ifndef anon_h -#define anon_h +#pragma once #include #include @@ -136,5 +135,3 @@ ipaddr32_t anonymize_ip(ipaddr32_t ip, enum ip_addr_anonymization_class_t cl); #define LOG_ANONYMIZATION_MAPPING void log_anonymization_mapping(ipaddr32_t input, ipaddr32_t output); - -#endif diff --git a/src/Attr.h b/src/Attr.h index 09a8266929..fc33445618 100644 --- a/src/Attr.h +++ b/src/Attr.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef attr_h -#define attr_h +#pragma once #include "Obj.h" @@ -103,5 +102,3 @@ protected: bool in_record; bool global_var; }; - -#endif diff --git a/src/Base64.h b/src/Base64.h index b1f5200cd6..8c8146c3c0 100644 --- a/src/Base64.h +++ b/src/Base64.h @@ -1,5 +1,4 @@ -#ifndef base64_h -#define base64_h +#pragma once #include #include @@ -71,5 +70,3 @@ protected: BroString* decode_base64(const BroString* s, const BroString* a = 0, Connection* conn = 0); BroString* encode_base64(const BroString* s, const BroString* a = 0, Connection* conn = 0); - -#endif /* base64_h */ diff --git a/src/BroList.h b/src/BroList.h index d4d3451a24..48e9ebee04 100644 --- a/src/BroList.h +++ b/src/BroList.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef brolist_h -#define brolist_h +#pragma once #include "List.h" @@ -25,5 +24,3 @@ typedef PList attr_list; class Timer; typedef PList timer_list; - -#endif diff --git a/src/BroString.h b/src/BroString.h index cad03e83d8..35102a7209 100644 --- a/src/BroString.h +++ b/src/BroString.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef brostring_h -#define brostring_h +#pragma once #include #include @@ -187,5 +186,3 @@ extern BroString* concatenate(std::vector& v); extern BroString* concatenate(BroString::Vec& v); extern BroString* concatenate(BroString::CVec& v); extern void delete_strings(std::vector& v); - -#endif diff --git a/src/Brofiler.h b/src/Brofiler.h index d871800360..9dbbed376e 100644 --- a/src/Brofiler.h +++ b/src/Brofiler.h @@ -1,5 +1,4 @@ -#ifndef BROFILER_H_ -#define BROFILER_H_ +#pragma once #include #include @@ -79,5 +78,3 @@ private: }; extern Brofiler brofiler; - -#endif /* BROFILER_H_ */ diff --git a/src/CCL.h b/src/CCL.h index a842b15fe6..28f41e9922 100644 --- a/src/CCL.h +++ b/src/CCL.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ccl_h -#define ccl_h +#pragma once #include #include "List.h" @@ -33,5 +32,3 @@ protected: int negated; int index; }; - -#endif diff --git a/src/CompHash.h b/src/CompHash.h index 532b2781ae..073d4b049f 100644 --- a/src/CompHash.h +++ b/src/CompHash.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef comphash_h -#define comphash_h +#pragma once #include "Hash.h" #include "Type.h" @@ -89,5 +88,3 @@ protected: InternalTypeTag singleton_tag; }; - -#endif diff --git a/src/Conn.h b/src/Conn.h index d0c73d93d5..fd30f469de 100644 --- a/src/Conn.h +++ b/src/Conn.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef conn_h -#define conn_h +#pragma once #include @@ -378,5 +377,3 @@ protected: #define ADD_TIMER(timer, t, do_expire, type) \ AddTimer(timer_func(timer), (t), (do_expire), (type)) - -#endif diff --git a/src/Continuation.h b/src/Continuation.h index 373e049f98..039b37f249 100644 --- a/src/Continuation.h +++ b/src/Continuation.h @@ -4,8 +4,7 @@ // TODO: - Document how to use this. // - Find some nice macro-based interface? -#ifndef continuation_h -#define continuation_h +#pragma once #include "List.h" @@ -54,5 +53,3 @@ private: voidp_list states; }; - -#endif diff --git a/src/ConvertUTF.h b/src/ConvertUTF.h index 4eb7900e9f..fe7939914e 100644 --- a/src/ConvertUTF.h +++ b/src/ConvertUTF.h @@ -136,8 +136,7 @@ ------------------------------------------------------------------------ */ -#ifndef LLVM_SUPPORT_CONVERTUTF_H -#define LLVM_SUPPORT_CONVERTUTF_H +#pragma once /* --------------------------------------------------------------------- The following 4 definitions are compiler-specific. @@ -232,5 +231,3 @@ unsigned getNumBytesForUTF8(UTF8 firstByte); #endif /* --------------------------------------------------------------------- */ - -#endif diff --git a/src/DFA.h b/src/DFA.h index 04d6e5a280..12620568ae 100644 --- a/src/DFA.h +++ b/src/DFA.h @@ -1,8 +1,7 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef dfa_h -#define dfa_h +#pragma once #include @@ -146,5 +145,3 @@ inline DFA_State* DFA_State::Xtion(int sym, DFA_Machine* machine) else return xtions[sym]; } - -#endif diff --git a/src/DNS_Mgr.h b/src/DNS_Mgr.h index b0b2ff3638..00397f351f 100644 --- a/src/DNS_Mgr.h +++ b/src/DNS_Mgr.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef dnsmgr_h -#define dnsmgr_h +#pragma once #include #include @@ -246,5 +245,3 @@ protected: }; extern DNS_Mgr* dns_mgr; - -#endif diff --git a/src/DbgBreakpoint.h b/src/DbgBreakpoint.h index 5fadfe0474..6f762e3c00 100644 --- a/src/DbgBreakpoint.h +++ b/src/DbgBreakpoint.h @@ -1,7 +1,6 @@ // Structures and methods for implementing breakpoints in the Bro debugger. -#ifndef DbgBreakpoint_h -#define DbgBreakpoint_h +#pragma once #include "Debug.h" @@ -77,5 +76,3 @@ protected: string condition; // condition to evaluate; nil for none }; - -#endif diff --git a/src/DbgDisplay.h b/src/DbgDisplay.h index 1c83d84ec4..2af0107261 100644 --- a/src/DbgDisplay.h +++ b/src/DbgDisplay.h @@ -1,7 +1,6 @@ // Structures and methods for implementing watches in the Bro debugger. -#ifndef dbg_display_h -#define dbg_display_h +#pragma once #include "Debug.h" @@ -24,5 +23,3 @@ protected: bool enabled; Expr* expression; }; - -#endif diff --git a/src/DbgWatch.h b/src/DbgWatch.h index 3722d10e69..fa96c083bc 100644 --- a/src/DbgWatch.h +++ b/src/DbgWatch.h @@ -1,7 +1,6 @@ // Structures and methods for implementing watches in the Bro debugger. -#ifndef dbgwatch_h -#define dbgwatch_h +#pragma once #include "Debug.h" @@ -15,5 +14,3 @@ protected: BroObj* var; Expr* expr; }; - -#endif diff --git a/src/Debug.h b/src/Debug.h index 16d6761bce..a036dd264e 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -1,7 +1,6 @@ // Debugging support for Bro policy files. -#ifndef debug_h -#define debug_h +#pragma once #include #include @@ -180,5 +179,3 @@ extern std::map g_dbgfilemaps; // filename => filemap // Perhaps add a code/priority argument to do selective output. int debug_msg(const char* fmt, ...) __attribute__ ((format (printf, 1, 2))); - -#endif diff --git a/src/DebugCmds.h b/src/DebugCmds.h index 1c6c243786..7eb0f025a7 100644 --- a/src/DebugCmds.h +++ b/src/DebugCmds.h @@ -1,8 +1,7 @@ // Support routines to help deal with Bro debugging commands and // implementation of most commands. -#ifndef debug_cmds_h -#define debug_cmds_h +#pragma once #include #include @@ -77,5 +76,3 @@ DbgCmdFn dbg_cmd_print; DbgCmdFn dbg_cmd_info; DbgCmdFn dbg_cmd_list; DbgCmdFn dbg_cmd_trace; - -#endif diff --git a/src/DebugLogger.h b/src/DebugLogger.h index 0e2862dc23..4efb6a0421 100644 --- a/src/DebugLogger.h +++ b/src/DebugLogger.h @@ -1,8 +1,7 @@ // A logger for (selective) debugging output. Only compiled in if DEBUG is // defined. -#ifndef debug_logger_h -#define debug_logger_h +#pragma once #ifdef DEBUG @@ -103,5 +102,3 @@ extern DebugLogger debug_logger; #define DBG_POP(stream) #define PLUGIN_DBG_LOG(plugin, args...) #endif - -#endif diff --git a/src/Desc.h b/src/Desc.h index 5063a933c5..fadf61eac7 100644 --- a/src/Desc.h +++ b/src/Desc.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef descriptor_h -#define descriptor_h +#pragma once #include #include @@ -202,5 +201,3 @@ protected: std::set encountered_types; }; - -#endif diff --git a/src/Dict.h b/src/Dict.h index 18762316e2..92a124486d 100644 --- a/src/Dict.h +++ b/src/Dict.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef dict_h -#define dict_h +#pragma once #include "List.h" #include "Hash.h" @@ -219,5 +218,3 @@ public: T* RemoveEntry(const HashKey* key) { return (T*) Remove(key->Key(), key->Size(), key->Hash()); } }; - -#endif diff --git a/src/Discard.h b/src/Discard.h index f4daabefa7..28a041cf05 100644 --- a/src/Discard.h +++ b/src/Discard.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef discard_h -#define discard_h +#pragma once #include "IP.h" #include "Func.h" @@ -35,5 +34,3 @@ protected: // Maximum amount of application data passed to filtering functions. int discarder_maxlen; }; - -#endif diff --git a/src/EquivClass.h b/src/EquivClass.h index 7ac5931326..5441442002 100644 --- a/src/EquivClass.h +++ b/src/EquivClass.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef equiv_class_h -#define equiv_class_h +#pragma once #include @@ -42,5 +41,3 @@ protected: int* ccl_flags; int ec_nil, no_class, no_rep; }; - -#endif diff --git a/src/Event.h b/src/Event.h index 0c0ad88ad3..411d48b011 100644 --- a/src/Event.h +++ b/src/Event.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef event_h -#define event_h +#pragma once #include "EventRegistry.h" @@ -143,5 +142,3 @@ protected: }; extern EventMgr mgr; - -#endif diff --git a/src/EventHandler.h b/src/EventHandler.h index 1f3e902b8f..4978eb3064 100644 --- a/src/EventHandler.h +++ b/src/EventHandler.h @@ -1,7 +1,6 @@ // Capsulates local and remote event handlers. -#ifndef EVENTHANDLER -#define EVENTHANDLER +#pragma once #include #include @@ -90,5 +89,3 @@ public: private: EventHandler* handler; }; - -#endif diff --git a/src/EventLauncher.h b/src/EventLauncher.h index 6a57c59391..6c0c002310 100644 --- a/src/EventLauncher.h +++ b/src/EventLauncher.h @@ -1,6 +1,3 @@ -#ifndef event_launcher_h -#define event_launcher_h +#pragma once #include "event.bif.func_h" - -#endif diff --git a/src/EventRegistry.h b/src/EventRegistry.h index fb4c1d8ca8..a8c1eb1049 100644 --- a/src/EventRegistry.h +++ b/src/EventRegistry.h @@ -1,7 +1,6 @@ // Each event raised/handled by Bro is registered in the EventRegistry. -#ifndef EVENT_REGISTRY -#define EVENT_REGISTRY +#pragma once #include #include @@ -43,5 +42,3 @@ private: }; extern EventRegistry* event_registry; - -#endif diff --git a/src/Expr.h b/src/Expr.h index 2d0a68a27a..34aaec4847 100644 --- a/src/Expr.h +++ b/src/Expr.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef expr_h -#define expr_h +#pragma once // BRO expressions. @@ -1108,5 +1107,3 @@ extern int expr_greater(const Expr* e1, const Expr* e2); // True if the given Val* has a vector type inline bool is_vector(Expr* e) { return e->Type()->Tag() == TYPE_VECTOR; } - -#endif diff --git a/src/File.h b/src/File.h index ffd912ab39..530d5c7a07 100644 --- a/src/File.h +++ b/src/File.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef file_h -#define file_h +#pragma once #include #include "util.h" @@ -102,5 +101,3 @@ protected: private: static std::list> open_files; }; - -#endif diff --git a/src/Flare.h b/src/Flare.h index fb6d7cae4c..cc340494aa 100644 --- a/src/Flare.h +++ b/src/Flare.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef BRO_FLARE_H -#define BRO_FLARE_H +#pragma once #include "Pipe.h" @@ -40,5 +39,3 @@ private: }; } // namespace bro - -#endif // BRO_FLARE_H diff --git a/src/Frag.h b/src/Frag.h index 8957237f03..1eccabcb94 100644 --- a/src/Frag.h +++ b/src/Frag.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef frag_h -#define frag_h +#pragma once #include @@ -67,5 +66,3 @@ public: protected: FragReassembler* f; }; - -#endif diff --git a/src/Frame.h b/src/Frame.h index f40517b7f0..433c2ff375 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef frame_h -#define frame_h +#pragma once #include #include @@ -282,5 +281,3 @@ private: * https://stackoverflow.com/a/16211097 */ extern std::vector g_frame_stack; - -#endif diff --git a/src/Func.h b/src/Func.h index 8e8eddc2d9..fc565d61ab 100644 --- a/src/Func.h +++ b/src/Func.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef func_h -#define func_h +#pragma once #include #include @@ -207,5 +206,3 @@ extern std::string render_call_stack(); // This is set to true after the built-in functions have been initialized. extern bool did_builtin_init; - -#endif diff --git a/src/Hash.h b/src/Hash.h index f204d73f59..0a5655f049 100644 --- a/src/Hash.h +++ b/src/Hash.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef hash_h -#define hash_h +#pragma once #include @@ -86,5 +85,3 @@ protected: }; extern void init_hash_function(); - -#endif diff --git a/src/ID.h b/src/ID.h index b90e5d9597..4ebcc9769d 100644 --- a/src/ID.h +++ b/src/ID.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef id_h -#define id_h +#pragma once #include "Type.h" #include "Attr.h" @@ -132,5 +131,3 @@ protected: bool infer_return_type; bool weak_ref; }; - -#endif diff --git a/src/IP.h b/src/IP.h index 7a8bcc90b3..a6017fdd30 100644 --- a/src/IP.h +++ b/src/IP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ip_h -#define ip_h +#pragma once #include "zeek-config.h" #include "net_util.h" @@ -586,5 +585,3 @@ private: bool del; const IPv6_Hdr_Chain* ip6_hdrs; }; - -#endif diff --git a/src/IPAddr.h b/src/IPAddr.h index 76beeb440b..a834fec851 100644 --- a/src/IPAddr.h +++ b/src/IPAddr.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IPADDR_H -#define IPADDR_H +#pragma once #include #include @@ -736,5 +735,3 @@ private: IPAddr prefix; // We store it as an address with the non-prefix bits masked out via Mask(). uint8_t length; // The bit length of the prefix relative to full IPv6 addr. }; - -#endif diff --git a/src/IntSet.h b/src/IntSet.h index 5bbdf88d9b..75bd977bf7 100644 --- a/src/IntSet.h +++ b/src/IntSet.h @@ -4,8 +4,7 @@ // It's implemented via a bitmap so the memory usage increases linearly // with max(set). -#ifndef intset_h -#define intset_h +#pragma once #include @@ -68,5 +67,3 @@ inline void IntSet::Clear() { bzero(set, size); } - -#endif diff --git a/src/List.h b/src/List.h index 01e5eb3f9b..e0046bb55a 100644 --- a/src/List.h +++ b/src/List.h @@ -1,5 +1,4 @@ -#ifndef list_h -#define list_h +#pragma once // BaseList.h -- // Interface for class BaseList, current implementation is as an @@ -348,5 +347,3 @@ typedef PList name_list; #define loop_over_list(list, iterator) \ int iterator; \ for ( iterator = 0; iterator < (list).length(); ++iterator ) - -#endif /* list_h */ diff --git a/src/NFA.h b/src/NFA.h index 3af4715189..2982323afe 100644 --- a/src/NFA.h +++ b/src/NFA.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef nfa_h -#define nfa_h +#pragma once #include "RE.h" #include "IntSet.h" @@ -133,5 +132,3 @@ extern NFA_state_list* epsilon_closure(NFA_state_list* states); // For sorting NFA states based on their ID fields (decreasing) extern bool NFA_state_cmp_neg(const NFA_State* v1, const NFA_State* v2); - -#endif diff --git a/src/Net.h b/src/Net.h index 26a3d0f883..d14f1346ef 100644 --- a/src/Net.h +++ b/src/Net.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef net_h -#define net_h +#pragma once #include "net_util.h" #include "util.h" @@ -99,5 +98,3 @@ struct ScannedFile { extern std::list files_scanned; extern std::vector sig_files; - -#endif diff --git a/src/NetVar.h b/src/NetVar.h index 41b2028064..632ea9ff42 100644 --- a/src/NetVar.h +++ b/src/NetVar.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef netvar_h -#define netvar_h +#pragma once #include "Val.h" #include "Func.h" @@ -203,5 +202,3 @@ extern void init_net_var(); #include "types.bif.netvar_h" #include "event.bif.netvar_h" #include "reporter.bif.netvar_h" - -#endif diff --git a/src/Notifier.h b/src/Notifier.h index 88ec90fc38..01ab3e3dc1 100644 --- a/src/Notifier.h +++ b/src/Notifier.h @@ -5,8 +5,7 @@ // from notifier::Receiver and register the interesting objects with the // notification::Registry. -#ifndef NOTIFIER_H -#define NOTIFIER_H +#pragma once #include #include @@ -112,5 +111,3 @@ protected: }; } - -#endif diff --git a/src/Obj.h b/src/Obj.h index 3c81a98fb4..0147a21a8b 100644 --- a/src/Obj.h +++ b/src/Obj.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef obj_h -#define obj_h +#pragma once #include @@ -212,5 +211,3 @@ inline void Unref(BroObj* o) // A dict_delete_func that knows to Unref() dictionary entries. extern void bro_obj_delete_func(void* v); - -#endif diff --git a/src/OpaqueVal.h b/src/OpaqueVal.h index ad9edc28ba..c95b046c10 100644 --- a/src/OpaqueVal.h +++ b/src/OpaqueVal.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef OPAQUEVAL_H -#define OPAQUEVAL_H +#pragma once #include #include @@ -335,5 +334,3 @@ protected: private: std::unique_ptr internal_paraglob; }; - -#endif diff --git a/src/PacketDumper.h b/src/PacketDumper.h index badbd3476a..e45adeb41f 100644 --- a/src/PacketDumper.h +++ b/src/PacketDumper.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef packetdumper_h -#define packetdumper_h +#pragma once using namespace std; @@ -38,5 +37,3 @@ struct ltipid { typedef set IP_IDSet; uint16_t NextIP_ID(const uint32_t src_addr, const uint16_t id); - -#endif diff --git a/src/PacketFilter.h b/src/PacketFilter.h index 35582a8ddc..1b5111800f 100644 --- a/src/PacketFilter.h +++ b/src/PacketFilter.h @@ -1,7 +1,6 @@ // Provides some very limited but fast packet filter mechanisms -#ifndef PACKETFILTER_H -#define PACKETFILTER_H +#pragma once #include "IP.h" #include "PrefixTable.h" @@ -41,5 +40,3 @@ private: PrefixTable src_filter; PrefixTable dst_filter; }; - -#endif diff --git a/src/Pipe.h b/src/Pipe.h index 05153bfd4d..eed32bac01 100644 --- a/src/Pipe.h +++ b/src/Pipe.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef BRO_PIPE_H -#define BRO_PIPE_H +#pragma once namespace bro { @@ -52,5 +51,3 @@ private: }; } // namespace bro - -#endif // BRO_PIPE_H diff --git a/src/PolicyFile.h b/src/PolicyFile.h index 62c475a98b..6049254a8d 100644 --- a/src/PolicyFile.h +++ b/src/PolicyFile.h @@ -1,3 +1,5 @@ +#pragma once + // Functions for displaying the contents of policy files. // Mostly useful for debugging code that wants to show context. // diff --git a/src/PrefixTable.h b/src/PrefixTable.h index 6606b77e81..35da3533ed 100644 --- a/src/PrefixTable.h +++ b/src/PrefixTable.h @@ -1,5 +1,4 @@ -#ifndef PREFIXTABLE_H -#define PREFIXTABLE_H +#pragma once #include "Val.h" #include "net_util.h" @@ -55,5 +54,3 @@ private: patricia_tree_t* tree; }; - -#endif diff --git a/src/PriorityQueue.h b/src/PriorityQueue.h index 68c9c1ee8c..c749f0dabc 100644 --- a/src/PriorityQueue.h +++ b/src/PriorityQueue.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef __PriorityQueue__ -#define __PriorityQueue__ +#pragma once #include #include "util.h" @@ -96,5 +95,3 @@ protected: int max_heap_size; uint64_t cumulative_num; }; - -#endif diff --git a/src/Queue.h b/src/Queue.h index 4f12343e6b..72adbd572a 100644 --- a/src/Queue.h +++ b/src/Queue.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef queue_h -#define queue_h +#pragma once // Queue.h -- // Interface for class Queue, current implementation is as an @@ -195,5 +194,3 @@ protected: template using PQueue = Queue; - -#endif /* queue_h */ diff --git a/src/RE.h b/src/RE.h index 845e01ba68..17fa36c0cf 100644 --- a/src/RE.h +++ b/src/RE.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef re_h -#define re_h +#pragma once #include "Obj.h" #include "Dict.h" @@ -229,5 +228,3 @@ protected: extern RE_Matcher* RE_Matcher_conjunction(const RE_Matcher* re1, const RE_Matcher* re2); extern RE_Matcher* RE_Matcher_disjunction(const RE_Matcher* re1, const RE_Matcher* re2); - -#endif diff --git a/src/RandTest.h b/src/RandTest.h index 128e03080a..32c2f38ee3 100644 --- a/src/RandTest.h +++ b/src/RandTest.h @@ -1,5 +1,4 @@ -#ifndef RANDTEST_H -#define RANDTEST_H +#pragma once #include "util.h" @@ -29,5 +28,3 @@ class RandTest { double cexp, montex, montey, montepi, sccu0, scclast, scct1, scct2, scct3; }; - -#endif diff --git a/src/Reassem.h b/src/Reassem.h index 4ba76635d3..44f00b8806 100644 --- a/src/Reassem.h +++ b/src/Reassem.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef reassem_h -#define reassem_h +#pragma once #include "Obj.h" #include "IPAddr.h" @@ -111,5 +110,3 @@ inline DataBlock::~DataBlock() Reassembler::sizes[rtype] -= pad_size(upper - seq) + padded_sizeof(DataBlock); delete [] block; } - -#endif diff --git a/src/Reporter.h b/src/Reporter.h index 7fe2001007..29b7c5d586 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef REPORTER_H -#define REPORTER_H +#pragma once #include @@ -280,5 +279,3 @@ private: }; extern Reporter* reporter; - -#endif diff --git a/src/Rule.h b/src/Rule.h index 54cf04971c..bc478f18f3 100644 --- a/src/Rule.h +++ b/src/Rule.h @@ -1,5 +1,4 @@ -#ifndef rule_h -#define rule_h +#pragma once #include #include @@ -108,5 +107,3 @@ private: // Array of rules indexed by payloadid. static rule_list rule_table; }; - -#endif diff --git a/src/RuleAction.h b/src/RuleAction.h index 8499065ea0..a20442952b 100644 --- a/src/RuleAction.h +++ b/src/RuleAction.h @@ -1,5 +1,4 @@ -#ifndef ruleaction_h -#define ruleaction_h +#pragma once #include "BroString.h" #include "List.h" @@ -98,5 +97,3 @@ public: void PrintDebug() override; }; - -#endif diff --git a/src/RuleCondition.h b/src/RuleCondition.h index b83af3e0b4..ee0a30dda4 100644 --- a/src/RuleCondition.h +++ b/src/RuleCondition.h @@ -1,5 +1,4 @@ -#ifndef rulecondition_h -#define rulecondition_h +#pragma once #include "BroString.h" #include "Func.h" @@ -117,5 +116,3 @@ private: }; - -#endif diff --git a/src/RuleMatcher.h b/src/RuleMatcher.h index 601315d4bb..21c65d2700 100644 --- a/src/RuleMatcher.h +++ b/src/RuleMatcher.h @@ -1,5 +1,4 @@ -#ifndef sigs_h -#define sigs_h +#pragma once #include #include @@ -391,5 +390,3 @@ private: RuleEndpointState* orig_match_state; RuleEndpointState* resp_match_state; }; - -#endif diff --git a/src/Scope.h b/src/Scope.h index 4eca1d46f5..2c25863e23 100644 --- a/src/Scope.h +++ b/src/Scope.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef scope_h -#define scope_h +#pragma once #include #include @@ -92,5 +91,3 @@ extern Scope* global_scope(); // Current module (identified by its name). extern string current_module; - -#endif diff --git a/src/SerializationFormat.h b/src/SerializationFormat.h index 0c2e6f4952..03bf758c31 100644 --- a/src/SerializationFormat.h +++ b/src/SerializationFormat.h @@ -1,7 +1,6 @@ // Implements different data formats for serialization. -#ifndef SERIALIZATION_FORMAT -#define SERIALIZATION_FORMAT +#pragma once #include @@ -133,5 +132,3 @@ public: bool WriteCloseTag(const char* tag) override; bool WriteSeparator() override; }; - -#endif diff --git a/src/Sessions.h b/src/Sessions.h index cf75837eb4..f2120ba694 100644 --- a/src/Sessions.h +++ b/src/Sessions.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef sessions_h -#define sessions_h +#pragma once #include #include @@ -283,5 +282,3 @@ private: // Manager for the currently active sessions. extern NetSessions* sessions; - -#endif diff --git a/src/SmithWaterman.h b/src/SmithWaterman.h index 2eb359dec0..541f777b89 100644 --- a/src/SmithWaterman.h +++ b/src/SmithWaterman.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef smith_waterman_h -#define smith_waterman_h +#pragma once #include "BroString.h" #include @@ -153,5 +152,3 @@ struct SWParams { extern BroSubstring::Vec* smith_waterman(const BroString* s1, const BroString* s2, SWParams& params); - -#endif diff --git a/src/Stats.h b/src/Stats.h index 1bee8fec85..a01997136f 100644 --- a/src/Stats.h +++ b/src/Stats.h @@ -1,7 +1,6 @@ // Classes that collect and report statistics. -#ifndef STATS_H -#define STATS_H +#pragma once #include #include @@ -131,5 +130,3 @@ protected: uint64_t pkt_cnt; uint64_t byte_cnt; }; - -#endif diff --git a/src/Stmt.h b/src/Stmt.h index d824af9376..f8e14386f3 100644 --- a/src/Stmt.h +++ b/src/Stmt.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef stmt_h -#define stmt_h +#pragma once // BRO statements. @@ -495,5 +494,3 @@ protected: Expr* timeout; bool is_return; }; - -#endif diff --git a/src/StmtEnums.h b/src/StmtEnums.h index ad99c2365a..d2c2eb9e62 100644 --- a/src/StmtEnums.h +++ b/src/StmtEnums.h @@ -1,8 +1,7 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef stmt_enums_h -#define stmt_enums_h +#pragma once // These are in a separate file to break circular dependences typedef enum { @@ -31,5 +30,3 @@ typedef enum { } stmt_flow_type; extern const char* stmt_name(BroStmtTag t); - -#endif diff --git a/src/Tag.h b/src/Tag.h index 4510a0c44e..b62c6ce3d1 100644 --- a/src/Tag.h +++ b/src/Tag.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef TAG_H -#define TAG_H +#pragma once #include "zeek-config.h" #include "util.h" @@ -139,5 +138,3 @@ private: subtype_t subtype; // Subtype. mutable EnumVal* val; // Script-layer value. }; - -#endif diff --git a/src/Timer.h b/src/Timer.h index b50c45da43..5eb0aadec8 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef timer_h -#define timer_h +#pragma once #include @@ -175,5 +174,3 @@ protected: }; extern TimerMgr* timer_mgr; - -#endif diff --git a/src/Traverse.h b/src/Traverse.h index 3791a9bbdc..834611b0d9 100644 --- a/src/Traverse.h +++ b/src/Traverse.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef traverse_h -#define traverse_h +#pragma once #include "Obj.h" #include "Stmt.h" @@ -38,5 +37,3 @@ public: }; TraversalCode traverse_all(TraversalCallback* cb); - -#endif diff --git a/src/TraverseTypes.h b/src/TraverseTypes.h index b0528f34be..46ea7d193b 100644 --- a/src/TraverseTypes.h +++ b/src/TraverseTypes.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef statictypes_h -#define statictypes_h +#pragma once enum TraversalCode { TC_CONTINUE = 0, @@ -35,5 +34,3 @@ enum TraversalCode { return (code); class TraversalCallback; - -#endif diff --git a/src/Trigger.h b/src/Trigger.h index 2e0c91865f..59ba30b300 100644 --- a/src/Trigger.h +++ b/src/Trigger.h @@ -1,5 +1,4 @@ -#ifndef TRIGGER_H -#define TRIGGER_H +#pragma once #include #include @@ -112,5 +111,3 @@ private: static unsigned long total_triggers; }; - -#endif diff --git a/src/TunnelEncapsulation.h b/src/TunnelEncapsulation.h index 8bbd5c485c..ca762eb704 100644 --- a/src/TunnelEncapsulation.h +++ b/src/TunnelEncapsulation.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef TUNNELS_H -#define TUNNELS_H +#pragma once #include "zeek-config.h" #include "NetVar.h" @@ -216,5 +215,3 @@ public: protected: vector* conns; }; - -#endif diff --git a/src/Type.h b/src/Type.h index a4a4bcc703..e0729cbf5f 100644 --- a/src/Type.h +++ b/src/Type.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef type_h -#define type_h +#pragma once #include #include @@ -735,5 +734,3 @@ extern int is_assignable(BroType* t); // True if either tag is the error type. #define EitherError(t1, t2) (IsErrorType(t1) || IsErrorType(t2)) - -#endif diff --git a/src/UID.h b/src/UID.h index aadab9f5a4..9f1cd75c8d 100644 --- a/src/UID.h +++ b/src/UID.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef BRO_UID_H -#define BRO_UID_H +#pragma once #include @@ -111,5 +110,3 @@ inline std::string UID::Base62(std::string prefix) const } } // namespace Bro - -#endif diff --git a/src/Val.h b/src/Val.h index cf746b1038..bcdaa52393 100644 --- a/src/Val.h +++ b/src/Val.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef val_h -#define val_h +#pragma once #include #include @@ -1133,5 +1132,3 @@ extern bool can_cast_value_to_type(const Val* v, BroType* t); // However, even this function returns true, casting may still fail for a // specific instance later. extern bool can_cast_value_to_type(const BroType* s, BroType* t); - -#endif diff --git a/src/Var.h b/src/Var.h index 849a162587..f90250a3b1 100644 --- a/src/Var.h +++ b/src/Var.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef var_h -#define var_h +#pragma once #include // std::unique_ptr @@ -49,5 +48,3 @@ extern Func* internal_func(const char* name); extern EventHandlerPtr internal_handler(const char* name); extern int signal_val; // 0 if no signal pending - -#endif diff --git a/src/WeirdState.h b/src/WeirdState.h index 64dc2bb4b2..22f42c5524 100644 --- a/src/WeirdState.h +++ b/src/WeirdState.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef WEIRDSTATE_H -#define WEIRDSTATE_H +#pragma once #include #include @@ -16,6 +15,3 @@ using WeirdStateMap = std::unordered_map; bool PermitWeird(WeirdStateMap& wsm, const char* name, uint64_t threshold, uint64_t rate, double duration); - -#endif // WEIRDSTATE_H - diff --git a/src/analyzer/Analyzer.h b/src/analyzer/Analyzer.h index 9c373814f1..a896563abe 100644 --- a/src/analyzer/Analyzer.h +++ b/src/analyzer/Analyzer.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_ANALYZER_H -#define ANALYZER_ANALYZER_H +#pragma once #include #include @@ -918,5 +917,3 @@ private: }; } - -#endif diff --git a/src/analyzer/Component.h b/src/analyzer/Component.h index 74224e4ba4..1c0f0a2002 100644 --- a/src/analyzer/Component.h +++ b/src/analyzer/Component.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_COMPONENT_H -#define ANALYZER_COMPONENT_H +#pragma once #include "Tag.h" #include "plugin/Component.h" @@ -109,5 +108,3 @@ private: }; } - -#endif diff --git a/src/analyzer/Manager.h b/src/analyzer/Manager.h index 607a058579..94dac8e0f1 100644 --- a/src/analyzer/Manager.h +++ b/src/analyzer/Manager.h @@ -18,8 +18,7 @@ * maintains mappings of (1) analyzer::Tag to component, and (2) * human-readable analyzer name to component. */ -#ifndef ANALYZER_MANAGER_H -#define ANALYZER_MANAGER_H +#pragma once #include #include @@ -417,5 +416,3 @@ extern analyzer::Manager* analyzer_mgr; # define DBG_ANALYZER(conn, txt) # define DBG_ANALYZER_ARGS(conn, fmt, args...) #endif - -#endif diff --git a/src/analyzer/Tag.h b/src/analyzer/Tag.h index 2e9343da61..b36d10863b 100644 --- a/src/analyzer/Tag.h +++ b/src/analyzer/Tag.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_TAG_H -#define ANALYZER_TAG_H +#pragma once #include "zeek-config.h" #include "util.h" @@ -110,5 +109,3 @@ protected: }; } - -#endif diff --git a/src/analyzer/protocol/arp/ARP.h b/src/analyzer/protocol/arp/ARP.h index 34c944724a..9037a42b27 100644 --- a/src/analyzer/protocol/arp/ARP.h +++ b/src/analyzer/protocol/arp/ARP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_ARP_ARP_H -#define ANALYZER_PROTOCOL_ARP_ARP_H +#pragma once #include "zeek-config.h" #include @@ -53,5 +52,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ayiya/AYIYA.h b/src/analyzer/protocol/ayiya/AYIYA.h index 8437f05f5c..c1b60361d4 100644 --- a/src/analyzer/protocol/ayiya/AYIYA.h +++ b/src/analyzer/protocol/ayiya/AYIYA.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_AYIYA_AYIYA_H -#define ANALYZER_PROTOCOL_AYIYA_AYIYA_H +#pragma once #include "ayiya_pac.h" @@ -22,5 +21,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/bittorrent/BitTorrent.h b/src/analyzer/protocol/bittorrent/BitTorrent.h index a2dc0ee375..089cf7f1bf 100644 --- a/src/analyzer/protocol/bittorrent/BitTorrent.h +++ b/src/analyzer/protocol/bittorrent/BitTorrent.h @@ -1,7 +1,6 @@ // This code contributed by Nadi Sarrar. -#ifndef ANALYZER_PROTOCOL_BITTORRENT_BITTORRENT_H -#define ANALYZER_PROTOCOL_BITTORRENT_BITTORRENT_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -31,5 +30,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/bittorrent/BitTorrentTracker.h b/src/analyzer/protocol/bittorrent/BitTorrentTracker.h index 4f2d421ca3..d86216cb18 100644 --- a/src/analyzer/protocol/bittorrent/BitTorrentTracker.h +++ b/src/analyzer/protocol/bittorrent/BitTorrentTracker.h @@ -1,7 +1,6 @@ // This code contributed by Nadi Sarrar. -#ifndef ANALYZER_PROTOCOL_BITTORRENT_BITTORRENTTRACKER_H -#define ANALYZER_PROTOCOL_BITTORRENT_BITTORRENTTRACKER_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -129,5 +128,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/conn-size/ConnSize.h b/src/analyzer/protocol/conn-size/ConnSize.h index 641a956482..241e67877a 100644 --- a/src/analyzer/protocol/conn-size/ConnSize.h +++ b/src/analyzer/protocol/conn-size/ConnSize.h @@ -1,8 +1,7 @@ // See the file "COPYING" in the main distribution directory for copyright. // -#ifndef ANALYZER_PROTOCOL_CONN_SIZE_CONNSIZE_H -#define ANALYZER_PROTOCOL_CONN_SIZE_CONNSIZE_H +#pragma once #include "analyzer/Analyzer.h" #include "NetVar.h" @@ -52,5 +51,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/dce-rpc/DCE_RPC.h b/src/analyzer/protocol/dce-rpc/DCE_RPC.h index 1ce6c17ebe..73b84c876a 100644 --- a/src/analyzer/protocol/dce-rpc/DCE_RPC.h +++ b/src/analyzer/protocol/dce-rpc/DCE_RPC.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_DCE_RPC_DCE_RPC_H -#define ANALYZER_PROTOCOL_DCE_RPC_DCE_RPC_H +#pragma once #include "NetVar.h" #include "analyzer/protocol/tcp/TCP.h" @@ -34,5 +33,3 @@ protected: }; } } // namespace analyzer::* - -#endif /* dce_rpc_h */ diff --git a/src/analyzer/protocol/dhcp/DHCP.h b/src/analyzer/protocol/dhcp/DHCP.h index 869729b614..fd311900f6 100644 --- a/src/analyzer/protocol/dhcp/DHCP.h +++ b/src/analyzer/protocol/dhcp/DHCP.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_DHCP_DHCP_H -#define ANALYZER_PROTOCOL_DHCP_DHCP_H +#pragma once #include "analyzer/protocol/udp/UDP.h" @@ -24,5 +23,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/dnp3/DNP3.h b/src/analyzer/protocol/dnp3/DNP3.h index 2020b20085..3f3700420f 100644 --- a/src/analyzer/protocol/dnp3/DNP3.h +++ b/src/analyzer/protocol/dnp3/DNP3.h @@ -1,6 +1,5 @@ -#ifndef ANALYZER_PROTOCOL_DNP3_DNP3_H -#define ANALYZER_PROTOCOL_DNP3_DNP3_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/udp/UDP.h" @@ -90,5 +89,3 @@ public: } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/dns/DNS.h b/src/analyzer/protocol/dns/DNS.h index c3d18aece9..a0fd2fa643 100644 --- a/src/analyzer/protocol/dns/DNS.h +++ b/src/analyzer/protocol/dns/DNS.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_DNS_DNS_H -#define ANALYZER_PROTOCOL_DNS_DNS_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "binpac_bro.h" @@ -375,5 +374,3 @@ protected: int IsReuse(double t, const u_char* pkt); } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/file/File.h b/src/analyzer/protocol/file/File.h index a48a2aba81..ff2a190880 100644 --- a/src/analyzer/protocol/file/File.h +++ b/src/analyzer/protocol/file/File.h @@ -1,7 +1,6 @@ // Analyzer for connections that transfer binary data. -#ifndef ANALYZER_PROTOCOL_FILE_FILE_H -#define ANALYZER_PROTOCOL_FILE_FILE_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -53,5 +52,3 @@ public: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/finger/Finger.h b/src/analyzer/protocol/finger/Finger.h index d7ea81f430..ea3b55f5cd 100644 --- a/src/analyzer/protocol/finger/Finger.h +++ b/src/analyzer/protocol/finger/Finger.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_FINGER_FINGER_H -#define ANALYZER_PROTOCOL_FINGER_FINGER_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/tcp/ContentLine.h" @@ -27,5 +26,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ftp/FTP.h b/src/analyzer/protocol/ftp/FTP.h index cab542ba2b..6bf0edd46a 100644 --- a/src/analyzer/protocol/ftp/FTP.h +++ b/src/analyzer/protocol/ftp/FTP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_FTP_FTP_H -#define ANALYZER_PROTOCOL_FTP_FTP_H +#pragma once #include "analyzer/protocol/login/NVT.h" #include "analyzer/protocol/tcp/TCP.h" @@ -50,5 +49,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/gnutella/Gnutella.h b/src/analyzer/protocol/gnutella/Gnutella.h index 895116cfbb..191156a168 100644 --- a/src/analyzer/protocol/gnutella/Gnutella.h +++ b/src/analyzer/protocol/gnutella/Gnutella.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_GNUTELLA_GNUTELLA_H -#define ANALYZER_PROTOCOL_GNUTELLA_GNUTELLA_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -70,5 +69,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/gssapi/GSSAPI.h b/src/analyzer/protocol/gssapi/GSSAPI.h index 6edaa1727a..aa9eb67044 100644 --- a/src/analyzer/protocol/gssapi/GSSAPI.h +++ b/src/analyzer/protocol/gssapi/GSSAPI.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_GSSAPI_GSSAPI_H -#define ANALYZER_PROTOCOL_GSSAPI_GSSAPI_H +#pragma once #include "events.bif.h" #include "analyzer/protocol/tcp/TCP.h" @@ -35,5 +34,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/gtpv1/GTPv1.h b/src/analyzer/protocol/gtpv1/GTPv1.h index e437ab1cb3..dceb9b56e7 100644 --- a/src/analyzer/protocol/gtpv1/GTPv1.h +++ b/src/analyzer/protocol/gtpv1/GTPv1.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_GTPV1_GTPV1_H -#define ANALYZER_PROTOCOL_GTPV1_GTPV1_H +#pragma once #include "gtpv1_pac.h" @@ -22,5 +21,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/http/HTTP.h b/src/analyzer/protocol/http/HTTP.h index 8cdd97e1e0..aa069a4156 100644 --- a/src/analyzer/protocol/http/HTTP.h +++ b/src/analyzer/protocol/http/HTTP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_HTTP_HTTP_H -#define ANALYZER_PROTOCOL_HTTP_HTTP_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/tcp/ContentLine.h" @@ -271,5 +270,3 @@ extern BroString* unescape_URI(const u_char* line, const u_char* line_end, analyzer::Analyzer* analyzer); } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/icmp/ICMP.h b/src/analyzer/protocol/icmp/ICMP.h index 9b8a56353b..042052266f 100644 --- a/src/analyzer/protocol/icmp/ICMP.h +++ b/src/analyzer/protocol/icmp/ICMP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_ICMP_ICMP_H -#define ANALYZER_PROTOCOL_ICMP_ICMP_H +#pragma once #include "RuleMatcher.h" #include "analyzer/Analyzer.h" @@ -91,5 +90,3 @@ extern int ICMP4_counterpart(int icmp_type, int icmp_code, bool& is_one_way); extern int ICMP6_counterpart(int icmp_type, int icmp_code, bool& is_one_way); } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ident/Ident.h b/src/analyzer/protocol/ident/Ident.h index daaef3fb38..fa1a7b9583 100644 --- a/src/analyzer/protocol/ident/Ident.h +++ b/src/analyzer/protocol/ident/Ident.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_IDENT_IDENT_H -#define ANALYZER_PROTOCOL_IDENT_IDENT_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/tcp/ContentLine.h" @@ -35,5 +34,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/imap/IMAP.h b/src/analyzer/protocol/imap/IMAP.h index cd27b84db9..56e998d2f8 100644 --- a/src/analyzer/protocol/imap/IMAP.h +++ b/src/analyzer/protocol/imap/IMAP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_IMAP_IMAP_H -#define ANALYZER_PROTOCOL_IMAP_IMAP_H +#pragma once // for std::transform #include @@ -36,5 +35,3 @@ protected: }; } } // namespace analyzer::* - -#endif /* ANALYZER_PROTOCOL_IMAP_IMAP_H */ diff --git a/src/analyzer/protocol/irc/IRC.h b/src/analyzer/protocol/irc/IRC.h index 8981d2ee65..e9ae91f272 100644 --- a/src/analyzer/protocol/irc/IRC.h +++ b/src/analyzer/protocol/irc/IRC.h @@ -1,7 +1,6 @@ // An IRC analyzer contributed by Roland Gruber. -#ifndef ANALYZER_PROTOCOL_IRC_IRC_H -#define ANALYZER_PROTOCOL_IRC_IRC_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/tcp/ContentLine.h" @@ -71,5 +70,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/krb/KRB.h b/src/analyzer/protocol/krb/KRB.h index 5867180221..e8578be850 100644 --- a/src/analyzer/protocol/krb/KRB.h +++ b/src/analyzer/protocol/krb/KRB.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_KRB_KRB_H -#define ANALYZER_PROTOCOL_KRB_KRB_H +#pragma once #include "krb_pac.h" @@ -43,5 +42,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/krb/KRB_TCP.h b/src/analyzer/protocol/krb/KRB_TCP.h index 1a38a50454..2c18c72357 100644 --- a/src/analyzer/protocol/krb/KRB_TCP.h +++ b/src/analyzer/protocol/krb/KRB_TCP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_KRB_KRB_TCP_H -#define ANALYZER_PROTOCOL_KRB_KRB_TCP_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -33,5 +32,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/login/Login.h b/src/analyzer/protocol/login/Login.h index a17b636685..59602d9148 100644 --- a/src/analyzer/protocol/login/Login.h +++ b/src/analyzer/protocol/login/Login.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_LOGIN_LOGIN_H -#define ANALYZER_PROTOCOL_LOGIN_LOGIN_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -85,5 +84,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/login/NVT.h b/src/analyzer/protocol/login/NVT.h index c967962953..b055ede6be 100644 --- a/src/analyzer/protocol/login/NVT.h +++ b/src/analyzer/protocol/login/NVT.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_LOGIN_NVT_H -#define ANALYZER_PROTOCOL_LOGIN_NVT_H +#pragma once #include "analyzer/protocol/tcp/ContentLine.h" @@ -171,5 +170,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/login/RSH.h b/src/analyzer/protocol/login/RSH.h index 44a9609a53..6b298c936e 100644 --- a/src/analyzer/protocol/login/RSH.h +++ b/src/analyzer/protocol/login/RSH.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_LOGIN_RSH_H -#define ANALYZER_PROTOCOL_LOGIN_RSH_H +#pragma once #include "Login.h" #include "analyzer/protocol/tcp/ContentLine.h" @@ -57,5 +56,3 @@ public: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/login/Rlogin.h b/src/analyzer/protocol/login/Rlogin.h index ffce6214ea..427dbed2de 100644 --- a/src/analyzer/protocol/login/Rlogin.h +++ b/src/analyzer/protocol/login/Rlogin.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_LOGIN_RLOGIN_H -#define ANALYZER_PROTOCOL_LOGIN_RLOGIN_H +#pragma once #include "Login.h" #include "analyzer/protocol/tcp/ContentLine.h" @@ -67,5 +66,3 @@ public: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/login/Telnet.h b/src/analyzer/protocol/login/Telnet.h index 3bafff8e78..e999042e1b 100644 --- a/src/analyzer/protocol/login/Telnet.h +++ b/src/analyzer/protocol/login/Telnet.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_LOGIN_TELNET_H -#define ANALYZER_PROTOCOL_LOGIN_TELNET_H +#pragma once #include "Login.h" @@ -17,5 +16,3 @@ public: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/mime/MIME.h b/src/analyzer/protocol/mime/MIME.h index 7ff89c88df..0a5b05283b 100644 --- a/src/analyzer/protocol/mime/MIME.h +++ b/src/analyzer/protocol/mime/MIME.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_MIME_MIME_H -#define ANALYZER_PROTOCOL_MIME_MIME_H +#pragma once #include #include @@ -284,5 +283,3 @@ extern int MIME_get_field_name(int len, const char* data, data_chunk_t* name); extern BroString* MIME_decode_quoted_pairs(data_chunk_t buf); } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/modbus/Modbus.h b/src/analyzer/protocol/modbus/Modbus.h index 704e73d376..bf5a966a0b 100644 --- a/src/analyzer/protocol/modbus/Modbus.h +++ b/src/analyzer/protocol/modbus/Modbus.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_MODBUS_MODBUS_H -#define ANALYZER_PROTOCOL_MODBUS_MODBUS_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "modbus_pac.h" @@ -25,5 +24,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/mqtt/MQTT.h b/src/analyzer/protocol/mqtt/MQTT.h index e9d728be53..56bbeab651 100644 --- a/src/analyzer/protocol/mqtt/MQTT.h +++ b/src/analyzer/protocol/mqtt/MQTT.h @@ -1,7 +1,6 @@ // Generated by binpac_quickstart -#ifndef ANALYZER_PROTOCOL_MQTT_MQTT_H -#define ANALYZER_PROTOCOL_MQTT_MQTT_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "ID.h" @@ -32,5 +31,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/mysql/MySQL.h b/src/analyzer/protocol/mysql/MySQL.h index c3e2e7bd40..7f19b3fbe9 100644 --- a/src/analyzer/protocol/mysql/MySQL.h +++ b/src/analyzer/protocol/mysql/MySQL.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_MYSQL_MYSQL_H -#define ANALYZER_PROTOCOL_MYSQL_MYSQL_H +#pragma once #include "events.bif.h" #include "analyzer/protocol/tcp/TCP.h" @@ -36,5 +35,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ncp/NCP.h b/src/analyzer/protocol/ncp/NCP.h index cd57266296..52dc21cdf1 100644 --- a/src/analyzer/protocol/ncp/NCP.h +++ b/src/analyzer/protocol/ncp/NCP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_NCP_NCP_H -#define ANALYZER_PROTOCOL_NCP_NCP_H +#pragma once // A very crude analyzer for NCP (Netware Core Protocol) // @@ -117,5 +116,3 @@ protected: }; } } // namespace analyzer::* - -#endif /* ncp_h */ diff --git a/src/analyzer/protocol/netbios/NetbiosSSN.h b/src/analyzer/protocol/netbios/NetbiosSSN.h index ee86725c84..e38b7b223b 100644 --- a/src/analyzer/protocol/netbios/NetbiosSSN.h +++ b/src/analyzer/protocol/netbios/NetbiosSSN.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_NETBIOS_SSN_NETBIOSSSN_H -#define ANALYZER_PROTOCOL_NETBIOS_SSN_NETBIOSSSN_H +#pragma once #include "analyzer/protocol/udp/UDP.h" #include "analyzer/protocol/tcp/TCP.h" @@ -169,5 +168,3 @@ protected: int IsReuse(double t, const u_char* pkt); } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ntlm/NTLM.h b/src/analyzer/protocol/ntlm/NTLM.h index 1760aa1d42..1e4342072a 100644 --- a/src/analyzer/protocol/ntlm/NTLM.h +++ b/src/analyzer/protocol/ntlm/NTLM.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_NTLM_NTLM_H -#define ANALYZER_PROTOCOL_NTLM_NTLM_H +#pragma once #include "events.bif.h" #include "analyzer/protocol/tcp/TCP.h" @@ -35,5 +34,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ntp/NTP.h b/src/analyzer/protocol/ntp/NTP.h index 1abe87d1d6..9a0da31515 100644 --- a/src/analyzer/protocol/ntp/NTP.h +++ b/src/analyzer/protocol/ntp/NTP.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_NTP_NTP_H -#define ANALYZER_PROTOCOL_NTP_NTP_H +#pragma once #include "events.bif.h" #include "types.bif.h" @@ -28,5 +27,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/pia/PIA.h b/src/analyzer/protocol/pia/PIA.h index 6db110cabb..c0df3c32f2 100644 --- a/src/analyzer/protocol/pia/PIA.h +++ b/src/analyzer/protocol/pia/PIA.h @@ -1,7 +1,6 @@ // An analyzer for application-layer protocol-detection. -#ifndef ANALYZER_PROTOCOL_PIA_PIA_H -#define ANALYZER_PROTOCOL_PIA_PIA_H +#pragma once #include "analyzer/Analyzer.h" #include "analyzer/protocol/tcp/TCP.h" @@ -173,5 +172,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/pop3/POP3.h b/src/analyzer/protocol/pop3/POP3.h index 9bc48a08f3..8159f0f6f1 100644 --- a/src/analyzer/protocol/pop3/POP3.h +++ b/src/analyzer/protocol/pop3/POP3.h @@ -2,8 +2,7 @@ // // An analyser for the POP3 protocol. -#ifndef ANALYZER_PROTOCOL_POP3_POP3_H -#define ANALYZER_PROTOCOL_POP3_POP3_H +#pragma once #include #include @@ -116,5 +115,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/radius/RADIUS.h b/src/analyzer/protocol/radius/RADIUS.h index 7c5f7c600a..00b3b21911 100644 --- a/src/analyzer/protocol/radius/RADIUS.h +++ b/src/analyzer/protocol/radius/RADIUS.h @@ -1,7 +1,6 @@ // Generated by binpac_quickstart -#ifndef ANALYZER_PROTOCOL_RADIUS_RADIUS_H -#define ANALYZER_PROTOCOL_RADIUS_RADIUS_H +#pragma once #include "events.bif.h" @@ -30,5 +29,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rdp/RDP.h b/src/analyzer/protocol/rdp/RDP.h index ce6e211aba..a991e06921 100644 --- a/src/analyzer/protocol/rdp/RDP.h +++ b/src/analyzer/protocol/rdp/RDP.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_RDP_RDP_H -#define ANALYZER_PROTOCOL_RDP_RDP_H +#pragma once #include "events.bif.h" @@ -34,5 +33,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rfb/RFB.h b/src/analyzer/protocol/rfb/RFB.h index f1fc6a7368..ff2b55d9c1 100644 --- a/src/analyzer/protocol/rfb/RFB.h +++ b/src/analyzer/protocol/rfb/RFB.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_RFB_RFB_H -#define ANALYZER_PROTOCOL_RFB_RFB_H +#pragma once #include "events.bif.h" @@ -40,5 +39,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rpc/MOUNT.h b/src/analyzer/protocol/rpc/MOUNT.h index 7c243f96a0..bb05bcd7cc 100644 --- a/src/analyzer/protocol/rpc/MOUNT.h +++ b/src/analyzer/protocol/rpc/MOUNT.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_RPC_MOUNT_H -#define ANALYZER_PROTOCOL_RPC_MOUNT_H +#pragma once #include "RPC.h" #include "XDR.h" @@ -51,5 +50,3 @@ public: } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rpc/NFS.h b/src/analyzer/protocol/rpc/NFS.h index 56a368bfdc..fecff7532b 100644 --- a/src/analyzer/protocol/rpc/NFS.h +++ b/src/analyzer/protocol/rpc/NFS.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_RPC_NFS_H -#define ANALYZER_PROTOCOL_RPC_NFS_H +#pragma once #include "RPC.h" #include "XDR.h" @@ -92,5 +91,3 @@ public: } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rpc/Portmap.h b/src/analyzer/protocol/rpc/Portmap.h index 5cce8d1aa5..d12ff3fe06 100644 --- a/src/analyzer/protocol/rpc/Portmap.h +++ b/src/analyzer/protocol/rpc/Portmap.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_RPC_PORTMAP_H -#define ANALYZER_PROTOCOL_RPC_PORTMAP_H +#pragma once #include "RPC.h" @@ -36,5 +35,3 @@ public: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rpc/RPC.h b/src/analyzer/protocol/rpc/RPC.h index 6b8992b78c..977272647b 100644 --- a/src/analyzer/protocol/rpc/RPC.h +++ b/src/analyzer/protocol/rpc/RPC.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_RPC_RPC_H -#define ANALYZER_PROTOCOL_RPC_RPC_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/udp/UDP.h" @@ -252,5 +251,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/rpc/XDR.h b/src/analyzer/protocol/rpc/XDR.h index 9feccb6003..9fa7f80faf 100644 --- a/src/analyzer/protocol/rpc/XDR.h +++ b/src/analyzer/protocol/rpc/XDR.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_RPC_XDR_H -#define ANALYZER_PROTOCOL_RPC_XDR_H +#pragma once #include #include @@ -19,5 +18,3 @@ extern const u_char* extract_XDR_opaque_fixed(const u_char*& buf, int& len, int extern uint32_t skip_XDR_opaque_auth(const u_char*& buf, int& len); } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/sip/SIP.h b/src/analyzer/protocol/sip/SIP.h index f562b7097c..453758a13b 100644 --- a/src/analyzer/protocol/sip/SIP.h +++ b/src/analyzer/protocol/sip/SIP.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_SIP_SIP_H -#define ANALYZER_PROTOCOL_SIP_SIP_H +#pragma once #include "events.bif.h" @@ -27,5 +26,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/sip/SIP_TCP.h b/src/analyzer/protocol/sip/SIP_TCP.h index 998def6027..a288997cda 100644 --- a/src/analyzer/protocol/sip/SIP_TCP.h +++ b/src/analyzer/protocol/sip/SIP_TCP.h @@ -3,8 +3,7 @@ // TODO: This is preliminary code that's not yet functional and not // activated. We don't yet support SIP-over-TCP. -#ifndef ANALYZER_PROTOCOL_SIP_SIP_TCP_H -#define ANALYZER_PROTOCOL_SIP_SIP_TCP_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -33,5 +32,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/smb/SMB.h b/src/analyzer/protocol/smb/SMB.h index f1c45cc356..90d1664743 100644 --- a/src/analyzer/protocol/smb/SMB.h +++ b/src/analyzer/protocol/smb/SMB.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_SMB_SMB_H -#define ANALYZER_PROTOCOL_SMB_SMB_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "smb_pac.h" @@ -33,5 +32,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/smtp/SMTP.h b/src/analyzer/protocol/smtp/SMTP.h index a18728a7de..07a9af9b08 100644 --- a/src/analyzer/protocol/smtp/SMTP.h +++ b/src/analyzer/protocol/smtp/SMTP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_SMTP_SMTP_H -#define ANALYZER_PROTOCOL_SMTP_SMTP_H +#pragma once #include using namespace std; @@ -97,5 +96,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/snmp/SNMP.h b/src/analyzer/protocol/snmp/SNMP.h index b308a95117..1525c1cca1 100644 --- a/src/analyzer/protocol/snmp/SNMP.h +++ b/src/analyzer/protocol/snmp/SNMP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_SNMP_SNMP_H -#define ANALYZER_PROTOCOL_SNMP_SNMP_H +#pragma once #include "snmp_pac.h" @@ -27,5 +26,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/socks/SOCKS.h b/src/analyzer/protocol/socks/SOCKS.h index fda259e1ef..86591c6583 100644 --- a/src/analyzer/protocol/socks/SOCKS.h +++ b/src/analyzer/protocol/socks/SOCKS.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_SOCKS_SOCKS_H -#define ANALYZER_PROTOCOL_SOCKS_SOCKS_H +#pragma once // SOCKS v4 analyzer. @@ -39,5 +38,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ssh/SSH.h b/src/analyzer/protocol/ssh/SSH.h index 236fa70a8b..15abe4012f 100644 --- a/src/analyzer/protocol/ssh/SSH.h +++ b/src/analyzer/protocol/ssh/SSH.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_SSH_SSH_H -#define ANALYZER_PROTOCOL_SSH_SSH_H +#pragma once #include "events.bif.h" @@ -41,8 +40,6 @@ namespace analyzer { int service_accept_size; int userauth_failure_size; - }; - - } + }; } -#endif +} diff --git a/src/analyzer/protocol/ssl/DTLS.h b/src/analyzer/protocol/ssl/DTLS.h index 5c8eececf5..a8cc56958a 100644 --- a/src/analyzer/protocol/ssl/DTLS.h +++ b/src/analyzer/protocol/ssl/DTLS.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_SSL_DTLS_H -#define ANALYZER_PROTOCOL_SSL_DTLS_H +#pragma once #include "events.bif.h" @@ -34,5 +33,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/ssl/SSL.h b/src/analyzer/protocol/ssl/SSL.h index d076597a8d..73b16e45df 100644 --- a/src/analyzer/protocol/ssl/SSL.h +++ b/src/analyzer/protocol/ssl/SSL.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_SSL_SSL_H -#define ANALYZER_PROTOCOL_SSL_SSL_H +#pragma once #include "events.bif.h" @@ -40,5 +39,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/stepping-stone/SteppingStone.h b/src/analyzer/protocol/stepping-stone/SteppingStone.h index 56ad3651c0..1a10bbfc5a 100644 --- a/src/analyzer/protocol/stepping-stone/SteppingStone.h +++ b/src/analyzer/protocol/stepping-stone/SteppingStone.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_STEPPING_STONE_STEPPINGSTONE_H -#define ANALYZER_PROTOCOL_STEPPING_STONE_STEPPINGSTONE_H +#pragma once #include "Queue.h" #include "analyzer/protocol/tcp/TCP.h" @@ -84,5 +83,3 @@ protected: }; } } // namespace analyzer::* - -#endif /* steppingstone_h */ diff --git a/src/analyzer/protocol/syslog/Syslog.h b/src/analyzer/protocol/syslog/Syslog.h index f2c2d5b3fd..befbcb3748 100644 --- a/src/analyzer/protocol/syslog/Syslog.h +++ b/src/analyzer/protocol/syslog/Syslog.h @@ -1,6 +1,5 @@ -#ifndef ANALYZER_PROTOCOL_SYSLOG_SYSLOG_H -#define ANALYZER_PROTOCOL_SYSLOG_SYSLOG_H +#pragma once #include "analyzer/protocol/udp/UDP.h" #include "analyzer/protocol/tcp/TCP.h" @@ -47,5 +46,3 @@ protected: //}; // } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/tcp/ContentLine.h b/src/analyzer/protocol/tcp/ContentLine.h index f90e4d8f31..09244094df 100644 --- a/src/analyzer/protocol/tcp/ContentLine.h +++ b/src/analyzer/protocol/tcp/ContentLine.h @@ -1,7 +1,6 @@ // Support-analyzer to split a reassembled stream into lines. -#ifndef ANALYZER_PROTOCOL_TCP_CONTENTLINE_H -#define ANALYZER_PROTOCOL_TCP_CONTENTLINE_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -116,5 +115,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/tcp/Stats.h b/src/analyzer/protocol/tcp/Stats.h index 721d898d95..3d118d7ac1 100644 --- a/src/analyzer/protocol/tcp/Stats.h +++ b/src/analyzer/protocol/tcp/Stats.h @@ -1,6 +1,5 @@ -#ifndef ANALYZER_PROTOCOL_TCP_STATS_H -#define ANALYZER_PROTOCOL_TCP_STATS_H +#pragma once #include "TCP_Endpoint.h" @@ -67,5 +66,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/tcp/TCP.h b/src/analyzer/protocol/tcp/TCP.h index 8a95beef52..7eeff0bd49 100644 --- a/src/analyzer/protocol/tcp/TCP.h +++ b/src/analyzer/protocol/tcp/TCP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_TCP_TCP_H -#define ANALYZER_PROTOCOL_TCP_TCP_H +#pragma once #include "analyzer/Analyzer.h" #include "PacketDumper.h" @@ -321,5 +320,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/tcp/TCP_Endpoint.h b/src/analyzer/protocol/tcp/TCP_Endpoint.h index ab309b1118..6cd2d17ea9 100644 --- a/src/analyzer/protocol/tcp/TCP_Endpoint.h +++ b/src/analyzer/protocol/tcp/TCP_Endpoint.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_TCP_TCP_ENDPOINT_H -#define ANALYZER_PROTOCOL_TCP_TCP_ENDPOINT_H +#pragma once #include "IPAddr.h" @@ -252,5 +251,3 @@ protected: #define ENDIAN_CONFUSED 3 } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/tcp/TCP_Flags.h b/src/analyzer/protocol/tcp/TCP_Flags.h index cc3c1f5915..8b2b8820c6 100644 --- a/src/analyzer/protocol/tcp/TCP_Flags.h +++ b/src/analyzer/protocol/tcp/TCP_Flags.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_TCP_TCP_FLAGS_H -#define ANALYZER_PROTOCOL_TCP_TCP_FLAGS_H +#pragma once namespace analyzer { namespace tcp { @@ -51,5 +50,3 @@ inline string TCP_Flags::AsString() const } - -#endif diff --git a/src/analyzer/protocol/tcp/TCP_Reassembler.h b/src/analyzer/protocol/tcp/TCP_Reassembler.h index 278eac2ceb..5fc7a7fc8e 100644 --- a/src/analyzer/protocol/tcp/TCP_Reassembler.h +++ b/src/analyzer/protocol/tcp/TCP_Reassembler.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_TCP_TCP_REASSEMBLER_H -#define ANALYZER_PROTOCOL_TCP_TCP_REASSEMBLER_H +#pragma once #include "Reassem.h" #include "TCP_Endpoint.h" @@ -120,5 +119,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/teredo/Teredo.h b/src/analyzer/protocol/teredo/Teredo.h index 0afe049349..e76b6b7ba8 100644 --- a/src/analyzer/protocol/teredo/Teredo.h +++ b/src/analyzer/protocol/teredo/Teredo.h @@ -1,5 +1,4 @@ -#ifndef ANALYZER_PROTOCOL_TEREDO_TEREDO_H -#define ANALYZER_PROTOCOL_TEREDO_TEREDO_H +#pragma once #include "analyzer/Analyzer.h" #include "NetVar.h" @@ -90,5 +89,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/udp/UDP.h b/src/analyzer/protocol/udp/UDP.h index e81203e378..57ae23c7b6 100644 --- a/src/analyzer/protocol/udp/UDP.h +++ b/src/analyzer/protocol/udp/UDP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_UDP_UDP_H -#define ANALYZER_PROTOCOL_UDP_UDP_H +#pragma once #include "analyzer/Analyzer.h" #include @@ -53,5 +52,3 @@ private: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/vxlan/VXLAN.h b/src/analyzer/protocol/vxlan/VXLAN.h index 4c42550dbc..62873959da 100644 --- a/src/analyzer/protocol/vxlan/VXLAN.h +++ b/src/analyzer/protocol/vxlan/VXLAN.h @@ -1,7 +1,6 @@ // See the file in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_VXLAN_VXLAN_H -#define ANALYZER_PROTOCOL_VXLAN_VXLAN_H +#pragma once #include "analyzer/Analyzer.h" #include "NetVar.h" @@ -25,5 +24,3 @@ public: }; } } // namespace analyzer::* - -#endif diff --git a/src/analyzer/protocol/xmpp/XMPP.h b/src/analyzer/protocol/xmpp/XMPP.h index f9aae1b39d..e068e42c74 100644 --- a/src/analyzer/protocol/xmpp/XMPP.h +++ b/src/analyzer/protocol/xmpp/XMPP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_XMPP_XMPP_H -#define ANALYZER_PROTOCOL_XMPP_XMPP_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" @@ -34,5 +33,3 @@ protected: }; } } // namespace analyzer::* - -#endif /* ANALYZER_PROTOCOL_XMPP_XMPP_H */ diff --git a/src/analyzer/protocol/zip/ZIP.h b/src/analyzer/protocol/zip/ZIP.h index 89838729cd..d9b42147bd 100644 --- a/src/analyzer/protocol/zip/ZIP.h +++ b/src/analyzer/protocol/zip/ZIP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ANALYZER_PROTOCOL_ZIP_ZIP_H -#define ANALYZER_PROTOCOL_ZIP_ZIP_H +#pragma once #include "zeek-config.h" @@ -29,5 +28,3 @@ protected: }; } } // namespace analyzer::* - -#endif diff --git a/src/binpac_bro.h b/src/binpac_bro.h index 8dc3df9e6f..be525ee918 100644 --- a/src/binpac_bro.h +++ b/src/binpac_bro.h @@ -1,5 +1,4 @@ -#ifndef binpac_bro_h -#define binpac_bro_h +#pragma once class Connection; class Val; @@ -36,5 +35,3 @@ inline StringVal* bytestring_to_val(const_bytestring const &str) } } // namespace binpac - -#endif diff --git a/src/bro-bif.h b/src/bro-bif.h index 24312e4753..0853647af8 100644 --- a/src/bro-bif.h +++ b/src/bro-bif.h @@ -1,11 +1,8 @@ -#ifndef BRO_BIF_H -#define BRO_BIF_H +#pragma once // Headers to include by generated BiF code. #include "analyzer/Analyzer.h" #include "Conn.h" #include "NetVar.h" #include "Event.h" - -#endif diff --git a/src/bro_inet_ntop.h b/src/bro_inet_ntop.h index c018403893..61d1df7635 100644 --- a/src/bro_inet_ntop.h +++ b/src/bro_inet_ntop.h @@ -1,5 +1,4 @@ -#ifndef BRO_INET_NTOP_H -#define BRO_INET_NTOP_H +#pragma once #ifdef __cplusplus extern "C" { @@ -15,5 +14,3 @@ bro_inet_ntop(int af, const void * __restrict src, char * __restrict dst, #ifdef __cplusplus } #endif - -#endif diff --git a/src/broker/Data.h b/src/broker/Data.h index b134656123..2d286352e4 100644 --- a/src/broker/Data.h +++ b/src/broker/Data.h @@ -1,5 +1,4 @@ -#ifndef BRO_COMM_DATA_H -#define BRO_COMM_DATA_H +#pragma once #include #include @@ -302,5 +301,3 @@ protected: }; } // namespace bro_broker - -#endif // BRO_COMM_DATA_H diff --git a/src/broker/Manager.h b/src/broker/Manager.h index 569355b533..3b36d189dd 100644 --- a/src/broker/Manager.h +++ b/src/broker/Manager.h @@ -1,5 +1,4 @@ -#ifndef BRO_COMM_MANAGER_H -#define BRO_COMM_MANAGER_H +#pragma once #include #include @@ -408,5 +407,3 @@ private: } // namespace bro_broker extern bro_broker::Manager* broker_mgr; - -#endif // BRO_COMM_MANAGER_H diff --git a/src/broker/Store.h b/src/broker/Store.h index 46d19ee923..e1a20775f0 100644 --- a/src/broker/Store.h +++ b/src/broker/Store.h @@ -1,5 +1,4 @@ -#ifndef BRO_COMM_STORE_H -#define BRO_COMM_STORE_H +#pragma once #include "broker/store.bif.h" #include "broker/data.bif.h" @@ -135,5 +134,3 @@ broker::backend_options to_backend_options(broker::backend backend, RecordVal* options); } // namespace bro_broker - -#endif // BRO_COMM_STORE_H diff --git a/src/bsd-getopt-long.h b/src/bsd-getopt-long.h index c94589afaa..9a1a9cd85a 100644 --- a/src/bsd-getopt-long.h +++ b/src/bsd-getopt-long.h @@ -52,8 +52,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __BSD_GETOPT_LONG_H__ -#define __BSD_GETOPT_LONG_H__ +#pragma once #ifndef HAVE_GETOPT_LONG @@ -126,5 +125,3 @@ int pure_getopt(int nargc, char * const *nargv, const char *options); # endif #endif - -#endif diff --git a/src/cq.h b/src/cq.h index 152a7da536..a9ad7d35d3 100644 --- a/src/cq.h +++ b/src/cq.h @@ -1,3 +1,4 @@ +#pragma once #include diff --git a/src/digest.h b/src/digest.h index ed8f56aaa2..629ebc0ace 100644 --- a/src/digest.h +++ b/src/digest.h @@ -4,8 +4,7 @@ * Wrapper and helper functions for MD5/SHA digest algorithms. */ -#ifndef bro_digest_h -#define bro_digest_h +#pragma once #include #include @@ -113,5 +112,3 @@ inline unsigned char* internal_md5(const unsigned char* data, unsigned long len, hash_final(c, out); return out; } - -#endif //bro_digest_h diff --git a/src/file_analysis/Analyzer.h b/src/file_analysis/Analyzer.h index ebfd506682..e60003d492 100644 --- a/src/file_analysis/Analyzer.h +++ b/src/file_analysis/Analyzer.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_ANALYZER_H -#define FILE_ANALYSIS_ANALYZER_H +#pragma once #include "Val.h" #include "NetVar.h" @@ -189,5 +188,3 @@ private: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/AnalyzerSet.h b/src/file_analysis/AnalyzerSet.h index 032257f29e..cc5f9b1122 100644 --- a/src/file_analysis/AnalyzerSet.h +++ b/src/file_analysis/AnalyzerSet.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_ANALYZERSET_H -#define FILE_ANALYSIS_ANALYZERSET_H +#pragma once #include @@ -207,5 +206,3 @@ private: }; } // namespace file_analysiss - -#endif diff --git a/src/file_analysis/Component.h b/src/file_analysis/Component.h index 85e53a5cde..a4aee3d5eb 100644 --- a/src/file_analysis/Component.h +++ b/src/file_analysis/Component.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYZER_COMPONENT_H -#define FILE_ANALYZER_COMPONENT_H +#pragma once #include "Tag.h" #include "plugin/Component.h" @@ -77,5 +76,3 @@ private: }; } - -#endif diff --git a/src/file_analysis/File.h b/src/file_analysis/File.h index f2db944da1..94a15ae039 100644 --- a/src/file_analysis/File.h +++ b/src/file_analysis/File.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_FILE_H -#define FILE_ANALYSIS_FILE_H +#pragma once #include #include @@ -363,5 +362,3 @@ protected: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/FileReassembler.h b/src/file_analysis/FileReassembler.h index ad42371f08..9788948cb0 100644 --- a/src/file_analysis/FileReassembler.h +++ b/src/file_analysis/FileReassembler.h @@ -1,5 +1,4 @@ -#ifndef FILE_ANALYSIS_FILEREASSEMBLER_H -#define FILE_ANALYSIS_FILEREASSEMBLER_H +#pragma once #include "Reassem.h" #include "File.h" @@ -59,5 +58,3 @@ protected: }; } // namespace analyzer::* - -#endif diff --git a/src/file_analysis/FileTimer.h b/src/file_analysis/FileTimer.h index 57f4afb5ea..1ccadee1f3 100644 --- a/src/file_analysis/FileTimer.h +++ b/src/file_analysis/FileTimer.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_FILETIMER_H -#define FILE_ANALYSIS_FILETIMER_H +#pragma once #include #include "Timer.h" @@ -35,5 +34,3 @@ private: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/Manager.h b/src/file_analysis/Manager.h index 73e6e7e267..870d8e9d4e 100644 --- a/src/file_analysis/Manager.h +++ b/src/file_analysis/Manager.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_MANAGER_H -#define FILE_ANALYSIS_MANAGER_H +#pragma once #include #include @@ -428,5 +427,3 @@ VectorVal* GenMIMEMatchesVal(const RuleMatcher::MIME_Matches& m); } // namespace file_analysis extern file_analysis::Manager* file_mgr; - -#endif diff --git a/src/file_analysis/Tag.h b/src/file_analysis/Tag.h index d53c8d6a16..92100a2e69 100644 --- a/src/file_analysis/Tag.h +++ b/src/file_analysis/Tag.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYZER_TAG_H -#define FILE_ANALYZER_TAG_H +#pragma once #include "zeek-config.h" #include "util.h" @@ -108,5 +107,3 @@ protected: }; } - -#endif diff --git a/src/file_analysis/analyzer/data_event/DataEvent.h b/src/file_analysis/analyzer/data_event/DataEvent.h index 023708e81b..9120412665 100644 --- a/src/file_analysis/analyzer/data_event/DataEvent.h +++ b/src/file_analysis/analyzer/data_event/DataEvent.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_DATAEVENT_H -#define FILE_ANALYSIS_DATAEVENT_H +#pragma once #include @@ -65,5 +64,3 @@ private: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/analyzer/entropy/Entropy.h b/src/file_analysis/analyzer/entropy/Entropy.h index 419f9a8a60..86be06358d 100644 --- a/src/file_analysis/analyzer/entropy/Entropy.h +++ b/src/file_analysis/analyzer/entropy/Entropy.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_ENTROPY_H -#define FILE_ANALYSIS_ENTROPY_H +#pragma once #include @@ -80,5 +79,3 @@ private: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/analyzer/extract/Extract.h b/src/file_analysis/analyzer/extract/Extract.h index c21621093a..acf581be59 100644 --- a/src/file_analysis/analyzer/extract/Extract.h +++ b/src/file_analysis/analyzer/extract/Extract.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_EXTRACT_H -#define FILE_ANALYSIS_EXTRACT_H +#pragma once #include @@ -78,5 +77,3 @@ private: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/analyzer/hash/Hash.h b/src/file_analysis/analyzer/hash/Hash.h index 2b46c37679..f9ca8f8c63 100644 --- a/src/file_analysis/analyzer/hash/Hash.h +++ b/src/file_analysis/analyzer/hash/Hash.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_HASH_H -#define FILE_ANALYSIS_HASH_H +#pragma once #include @@ -156,5 +155,3 @@ protected: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/analyzer/pe/PE.h b/src/file_analysis/analyzer/pe/PE.h index bbbc2fe101..3a1c9befc0 100644 --- a/src/file_analysis/analyzer/pe/PE.h +++ b/src/file_analysis/analyzer/pe/PE.h @@ -1,5 +1,4 @@ -#ifndef FILE_ANALYSIS_PE_H -#define FILE_ANALYSIS_PE_H +#pragma once #include @@ -31,5 +30,3 @@ protected: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/analyzer/unified2/Unified2.h b/src/file_analysis/analyzer/unified2/Unified2.h index 7ee892f4eb..8184861b22 100644 --- a/src/file_analysis/analyzer/unified2/Unified2.h +++ b/src/file_analysis/analyzer/unified2/Unified2.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_UNIFIED2_H -#define FILE_ANALYSIS_UNIFIED2_H +#pragma once #include @@ -33,5 +32,3 @@ private: }; } // namespace file_analysis - -#endif diff --git a/src/file_analysis/analyzer/x509/OCSP.h b/src/file_analysis/analyzer/x509/OCSP.h index 1212fa8d70..f3c1465ed1 100644 --- a/src/file_analysis/analyzer/x509/OCSP.h +++ b/src/file_analysis/analyzer/x509/OCSP.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_OCSP_H -#define FILE_ANALYSIS_OCSP_H +#pragma once #include @@ -35,5 +34,3 @@ private: }; } - -#endif diff --git a/src/file_analysis/analyzer/x509/X509.h b/src/file_analysis/analyzer/x509/X509.h index f42e9710d9..ca5fa60c57 100644 --- a/src/file_analysis/analyzer/x509/X509.h +++ b/src/file_analysis/analyzer/x509/X509.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef FILE_ANALYSIS_X509_H -#define FILE_ANALYSIS_X509_H +#pragma once #include @@ -157,5 +156,3 @@ private: }; } - -#endif diff --git a/src/file_analysis/analyzer/x509/X509Common.h b/src/file_analysis/analyzer/x509/X509Common.h index 2f02357cca..fe56e0b9a8 100644 --- a/src/file_analysis/analyzer/x509/X509Common.h +++ b/src/file_analysis/analyzer/x509/X509Common.h @@ -3,8 +3,7 @@ // Common base class for the X509 and OCSP analyzer, which share a fair amount of // code -#ifndef FILE_ANALYSIS_X509_COMMON -#define FILE_ANALYSIS_X509_COMMON +#pragma once #include "file_analysis/File.h" #include "Analyzer.h" @@ -42,5 +41,3 @@ protected: }; } - -#endif /* FILE_ANALYSIS_X509_COMMON */ diff --git a/src/input.h b/src/input.h index 230a10073a..be898d154b 100644 --- a/src/input.h +++ b/src/input.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef input_h -#define input_h +#pragma once #include #include @@ -45,5 +44,3 @@ extern vector params; class Stmt; extern Stmt* stmts; // global statements - -#endif diff --git a/src/input/Component.h b/src/input/Component.h index cd3c1ea24d..2e6b55bb96 100644 --- a/src/input/Component.h +++ b/src/input/Component.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_COMPONENT_H -#define INPUT_COMPONENT_H +#pragma once #include "Tag.h" #include "plugin/Component.h" @@ -62,5 +61,3 @@ private: }; } - -#endif diff --git a/src/input/Manager.h b/src/input/Manager.h index 6b48f69ee4..2cdfb9e192 100644 --- a/src/input/Manager.h +++ b/src/input/Manager.h @@ -2,8 +2,7 @@ // // Class for managing input streams. -#ifndef INPUT_MANAGER_H -#define INPUT_MANAGER_H +#pragma once #include "BroString.h" #include "EventHandler.h" @@ -271,5 +270,3 @@ private: extern input::Manager* input_mgr; - -#endif /* INPUT_MANAGER_H */ diff --git a/src/input/ReaderBackend.h b/src/input/ReaderBackend.h index 84f6635da5..0d38edb40e 100644 --- a/src/input/ReaderBackend.h +++ b/src/input/ReaderBackend.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERBACKEND_H -#define INPUT_READERBACKEND_H +#pragma once #include "BroString.h" @@ -352,5 +351,3 @@ private: }; } - -#endif /* INPUT_READERBACKEND_H */ diff --git a/src/input/ReaderFrontend.h b/src/input/ReaderFrontend.h index c93b9960a0..c9f597eb74 100644 --- a/src/input/ReaderFrontend.h +++ b/src/input/ReaderFrontend.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERFRONTEND_H -#define INPUT_READERFRONTEND_H +#pragma once #include "ReaderBackend.h" #include "threading/MsgThread.h" @@ -134,8 +133,3 @@ private: }; } - - -#endif /* INPUT_READERFRONTEND_H */ - - diff --git a/src/input/Tag.h b/src/input/Tag.h index 625b57041f..42f24a0345 100644 --- a/src/input/Tag.h +++ b/src/input/Tag.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_TAG_H -#define INPUT_TAG_H +#pragma once #include "zeek-config.h" #include "util.h" @@ -109,5 +108,3 @@ protected: }; } - -#endif diff --git a/src/input/readers/ascii/Ascii.h b/src/input/readers/ascii/Ascii.h index 91177519bc..251ec05226 100644 --- a/src/input/readers/ascii/Ascii.h +++ b/src/input/readers/ascii/Ascii.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERS_ASCII_H -#define INPUT_READERS_ASCII_H +#pragma once #include #include @@ -96,5 +95,3 @@ private: } } - -#endif /* INPUT_READERS_ASCII_H */ diff --git a/src/input/readers/benchmark/Benchmark.h b/src/input/readers/benchmark/Benchmark.h index 2c71845723..944c85d06e 100644 --- a/src/input/readers/benchmark/Benchmark.h +++ b/src/input/readers/benchmark/Benchmark.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERS_BENCHMARK_H -#define INPUT_READERS_BENCHMARK_H +#pragma once #include "input/ReaderBackend.h" #include "threading/formatters/Ascii.h" @@ -46,5 +45,3 @@ private: } } - -#endif /* INPUT_READERS_BENCHMARK_H */ diff --git a/src/input/readers/binary/Binary.h b/src/input/readers/binary/Binary.h index 414c748a73..13a3d586cc 100644 --- a/src/input/readers/binary/Binary.h +++ b/src/input/readers/binary/Binary.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERS_BINARY_H -#define INPUT_READERS_BINARY_H +#pragma once #include #include @@ -47,5 +46,3 @@ private: } } - -#endif /* INPUT_READERS_BINARY_H */ diff --git a/src/input/readers/config/Config.h b/src/input/readers/config/Config.h index 336d72a989..4abddfb185 100644 --- a/src/input/readers/config/Config.h +++ b/src/input/readers/config/Config.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERS_CONFIG_H -#define INPUT_READERS_CONFIG_H +#pragma once #include #include @@ -65,5 +64,3 @@ private: } } - -#endif /* INPUT_READERS_CONFIG_H */ diff --git a/src/input/readers/raw/Plugin.h b/src/input/readers/raw/Plugin.h index 7dcd5e1b13..16f76ad3d6 100644 --- a/src/input/readers/raw/Plugin.h +++ b/src/input/readers/raw/Plugin.h @@ -1,5 +1,7 @@ // See the file in the main distribution directory for copyright. +#pragma once + #include #include "plugin/Plugin.h" diff --git a/src/input/readers/raw/Raw.h b/src/input/readers/raw/Raw.h index 2b9d4edcb4..e5b9c9bdc6 100644 --- a/src/input/readers/raw/Raw.h +++ b/src/input/readers/raw/Raw.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERS_RAW_H -#define INPUT_READERS_RAW_H +#pragma once #include #include @@ -92,5 +91,3 @@ private: } } - -#endif /* INPUT_READERS_RAW_H */ diff --git a/src/input/readers/sqlite/SQLite.h b/src/input/readers/sqlite/SQLite.h index 4255a2841f..b85af944db 100644 --- a/src/input/readers/sqlite/SQLite.h +++ b/src/input/readers/sqlite/SQLite.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef INPUT_READERS_SQLITE_H -#define INPUT_READERS_SQLITE_H +#pragma once #include "zeek-config.h" @@ -49,6 +48,3 @@ private: } } - -#endif /* INPUT_READERS_SQLITE_H */ - diff --git a/src/iosource/BPF_Program.h b/src/iosource/BPF_Program.h index b21f4244e2..4823b7c9b4 100644 --- a/src/iosource/BPF_Program.h +++ b/src/iosource/BPF_Program.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef bpf_program_h -#define bpf_program_h +#pragma once extern "C" { #include @@ -54,5 +53,3 @@ protected: bool m_matches_anything; struct bpf_program m_program; }; - -#endif diff --git a/src/iosource/Component.h b/src/iosource/Component.h index 2d9d19e799..cf072feb36 100644 --- a/src/iosource/Component.h +++ b/src/iosource/Component.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IOSOURCE_PLUGIN_COMPONENT_H -#define IOSOURCE_PLUGIN_COMPONENT_H +#pragma once #include #include @@ -168,5 +167,3 @@ private: }; } - -#endif diff --git a/src/iosource/FD_Set.h b/src/iosource/FD_Set.h index 61e3e7a59b..9176611c93 100644 --- a/src/iosource/FD_Set.h +++ b/src/iosource/FD_Set.h @@ -1,5 +1,4 @@ -#ifndef BRO_FD_SET_H -#define BRO_FD_SET_H +#pragma once #include #include @@ -100,5 +99,3 @@ private: }; } // namespace bro - -#endif // BRO_FD_SET_H diff --git a/src/iosource/IOSource.h b/src/iosource/IOSource.h index df82012268..e899a11754 100644 --- a/src/iosource/IOSource.h +++ b/src/iosource/IOSource.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IOSOURCE_IOSOURCE_H -#define IOSOURCE_IOSOURCE_H +#pragma once extern "C" { #include @@ -136,5 +135,3 @@ private: }; } - -#endif diff --git a/src/iosource/Manager.h b/src/iosource/Manager.h index e25b940bca..a02401a0f1 100644 --- a/src/iosource/Manager.h +++ b/src/iosource/Manager.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IOSOURCE_MANAGER_H -#define IOSOURCE_MANAGER_H +#pragma once #include #include @@ -144,6 +143,3 @@ private: } extern iosource::Manager* iosource_mgr; - -#endif - diff --git a/src/iosource/Packet.h b/src/iosource/Packet.h index f663e69ad1..0a0995f944 100644 --- a/src/iosource/Packet.h +++ b/src/iosource/Packet.h @@ -1,5 +1,4 @@ -#ifndef packet_h -#define packet_h +#pragma once #include "Desc.h" #include "IP.h" @@ -212,5 +211,3 @@ private: // True if L2 processing succeeded. bool l2_valid; }; - -#endif // packet_h diff --git a/src/iosource/PktDumper.h b/src/iosource/PktDumper.h index 4e53cd7aff..9a7949fc5d 100644 --- a/src/iosource/PktDumper.h +++ b/src/iosource/PktDumper.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IOSOURCE_PKTSRC_PKTDUMPER_H -#define IOSOURCE_PKTSRC_PKTDUMPER_H +#pragma once #include "Packet.h" #include "IOSource.h" @@ -138,5 +137,3 @@ private: }; } - -#endif diff --git a/src/iosource/PktSrc.h b/src/iosource/PktSrc.h index ed2b0b62fd..2f08508d85 100644 --- a/src/iosource/PktSrc.h +++ b/src/iosource/PktSrc.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IOSOURCE_PKTSRC_PKTSRC_H -#define IOSOURCE_PKTSRC_PKTSRC_H +#pragma once #include @@ -370,5 +369,3 @@ private: }; } - -#endif diff --git a/src/iosource/pcap/Dumper.h b/src/iosource/pcap/Dumper.h index 19defc627f..2857a1427d 100644 --- a/src/iosource/pcap/Dumper.h +++ b/src/iosource/pcap/Dumper.h @@ -1,7 +1,6 @@ // See the file in the main distribution directory for copyright. -#ifndef IOSOURCE_PKTSRC_PCAP_DUMPER_H -#define IOSOURCE_PKTSRC_PCAP_DUMPER_H +#pragma once extern "C" { #include @@ -35,7 +34,3 @@ private: } } - -#endif - - diff --git a/src/iosource/pcap/Source.h b/src/iosource/pcap/Source.h index 1672d1c10f..b9ef1e6da1 100644 --- a/src/iosource/pcap/Source.h +++ b/src/iosource/pcap/Source.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef IOSOURCE_PKTSRC_PCAP_SOURCE_H -#define IOSOURCE_PKTSRC_PCAP_SOURCE_H +#pragma once #include "../PktSrc.h" @@ -43,5 +42,3 @@ private: } } - -#endif diff --git a/src/logging/Component.h b/src/logging/Component.h index d99803b165..b80ae5f0b2 100644 --- a/src/logging/Component.h +++ b/src/logging/Component.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef LOGGING_COMPONENT_H -#define LOGGING_COMPONENT_H +#pragma once #include "Tag.h" #include "plugin/Component.h" @@ -62,5 +61,3 @@ private: }; } - -#endif diff --git a/src/logging/Manager.h b/src/logging/Manager.h index 96ff2ea0c9..06c551e8ed 100644 --- a/src/logging/Manager.h +++ b/src/logging/Manager.h @@ -2,8 +2,7 @@ // // A class managing log writers and filters. -#ifndef LOGGING_MANAGER_H -#define LOGGING_MANAGER_H +#pragma once #include @@ -279,5 +278,3 @@ private: } extern logging::Manager* log_mgr; - -#endif diff --git a/src/logging/Tag.h b/src/logging/Tag.h index e75d7fc007..d37561dd91 100644 --- a/src/logging/Tag.h +++ b/src/logging/Tag.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef LOGGING_TAG_H -#define LOGGING_TAG_H +#pragma once #include "zeek-config.h" #include "util.h" @@ -114,5 +113,3 @@ protected: }; } - -#endif diff --git a/src/logging/WriterBackend.h b/src/logging/WriterBackend.h index 35cf401199..bb0941322d 100644 --- a/src/logging/WriterBackend.h +++ b/src/logging/WriterBackend.h @@ -2,8 +2,7 @@ // // Bridge class between main process and writer threads. -#ifndef LOGGING_WRITERBACKEND_H -#define LOGGING_WRITERBACKEND_H +#pragma once #include "threading/MsgThread.h" @@ -390,6 +389,3 @@ private: } - -#endif - diff --git a/src/logging/WriterFrontend.h b/src/logging/WriterFrontend.h index bdfdddad18..b202621ec6 100644 --- a/src/logging/WriterFrontend.h +++ b/src/logging/WriterFrontend.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef LOGGING_WRITERFRONTEND_H -#define LOGGING_WRITERFRONTEND_H +#pragma once #include "WriterBackend.h" @@ -212,5 +211,3 @@ protected: }; } - -#endif diff --git a/src/logging/writers/ascii/Ascii.h b/src/logging/writers/ascii/Ascii.h index 0fb147b0c7..721ba95e20 100644 --- a/src/logging/writers/ascii/Ascii.h +++ b/src/logging/writers/ascii/Ascii.h @@ -2,8 +2,7 @@ // // Log writer for delimiter-separated ASCII logs. -#ifndef LOGGING_WRITER_ASCII_H -#define LOGGING_WRITER_ASCII_H +#pragma once #include "logging/WriterBackend.h" #include "threading/formatters/Ascii.h" @@ -76,5 +75,3 @@ private: } } - -#endif diff --git a/src/logging/writers/none/None.h b/src/logging/writers/none/None.h index 24193341b5..b00616f597 100644 --- a/src/logging/writers/none/None.h +++ b/src/logging/writers/none/None.h @@ -2,8 +2,7 @@ // // Dummy log writer that just discards everything (but still pretends to rotate). -#ifndef LOGGING_WRITER_NONE_H -#define LOGGING_WRITER_NONE_H +#pragma once #include "logging/WriterBackend.h" @@ -32,5 +31,3 @@ protected: } } - -#endif diff --git a/src/logging/writers/sqlite/SQLite.h b/src/logging/writers/sqlite/SQLite.h index 7e8ff739b3..b45357015d 100644 --- a/src/logging/writers/sqlite/SQLite.h +++ b/src/logging/writers/sqlite/SQLite.h @@ -2,8 +2,7 @@ // // Log writer for SQLITE logs. -#ifndef LOGGING_WRITER_SQLITE_H -#define LOGGING_WRITER_SQLITE_H +#pragma once #include "zeek-config.h" @@ -54,6 +53,3 @@ private: } } - -#endif /* LOGGING_WRITER_SQLITE_H */ - diff --git a/src/modp_numtoa.h b/src/modp_numtoa.h index 6b41ba644d..0834d61027 100644 --- a/src/modp_numtoa.h +++ b/src/modp_numtoa.h @@ -21,8 +21,7 @@ * */ -#ifndef COM_MODP_STRINGENCODERS_NUMTOA_H -#define COM_MODP_STRINGENCODERS_NUMTOA_H +#pragma once #ifdef __cplusplus #define BEGIN_C extern "C" { @@ -107,5 +106,3 @@ void modp_dtoa2(double value, char* buf, int precision); void modp_dtoa3(double value, char* buf, int n, int precision); END_C - -#endif diff --git a/src/module_util.h b/src/module_util.h index 4f957f2958..4e865380d2 100644 --- a/src/module_util.h +++ b/src/module_util.h @@ -2,6 +2,8 @@ // These functions are used by both Bro and bifcl. // +#pragma once + #include using namespace std; diff --git a/src/nb_dns.h b/src/nb_dns.h index eba9d39084..3505239f91 100644 --- a/src/nb_dns.h +++ b/src/nb_dns.h @@ -2,6 +2,8 @@ * See the file "COPYING" in the main distribution directory for copyright. */ +#pragma once + /* Private data */ struct nb_dns_info; diff --git a/src/net_util.h b/src/net_util.h index 603dc7af5a..f13c3aa740 100644 --- a/src/net_util.h +++ b/src/net_util.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef netutil_h -#define netutil_h +#pragma once #include "zeek-config.h" @@ -231,5 +230,3 @@ inline uint64_t htonll(uint64_t i) { return ntohll(i); } #endif #endif - -#endif diff --git a/src/patricia.h b/src/patricia.h index 3a9badd29a..819230be1d 100644 --- a/src/patricia.h +++ b/src/patricia.h @@ -47,8 +47,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _PATRICIA_H -#define _PATRICIA_H +#pragma once #include @@ -173,5 +172,3 @@ do { \ } \ } \ } while (0) - -#endif /* _PATRICIA_H */ diff --git a/src/plugin/Component.h b/src/plugin/Component.h index 63ca66c8ef..4b47481935 100644 --- a/src/plugin/Component.h +++ b/src/plugin/Component.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PLUGIN_COMPONENT_H -#define PLUGIN_COMPONENT_H +#pragma once #include @@ -105,5 +104,3 @@ private: }; } - -#endif diff --git a/src/plugin/ComponentManager.h b/src/plugin/ComponentManager.h index 30b3628588..7ff9093dc8 100644 --- a/src/plugin/ComponentManager.h +++ b/src/plugin/ComponentManager.h @@ -1,5 +1,4 @@ -#ifndef PLUGIN_COMPONENT_MANAGER_H -#define PLUGIN_COMPONENT_MANAGER_H +#pragma once #include #include @@ -248,5 +247,3 @@ void ComponentManager::RegisterComponent(C* component, } } // namespace plugin - -#endif diff --git a/src/plugin/Manager.h b/src/plugin/Manager.h index 5fd1070452..11fbcab74f 100644 --- a/src/plugin/Manager.h +++ b/src/plugin/Manager.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PLUGIN_MANAGER_H -#define PLUGIN_MANAGER_H +#pragma once #include #include @@ -493,5 +492,3 @@ public: * The global plugin manager singleton. */ extern plugin::Manager* plugin_mgr; - -#endif diff --git a/src/plugin/Plugin.h b/src/plugin/Plugin.h index 66a9b90376..b1fc642667 100644 --- a/src/plugin/Plugin.h +++ b/src/plugin/Plugin.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PLUGIN_PLUGIN_H -#define PLUGIN_PLUGIN_H +#pragma once #include #include @@ -911,5 +910,3 @@ private: }; } - -#endif diff --git a/src/plugin/TaggedComponent.h b/src/plugin/TaggedComponent.h index 2d507660c2..27ca497171 100644 --- a/src/plugin/TaggedComponent.h +++ b/src/plugin/TaggedComponent.h @@ -1,5 +1,4 @@ -#ifndef PLUGIN_TAGGED_COMPONENT_H -#define PLUGIN_TAGGED_COMPONENT_H +#pragma once #include @@ -72,5 +71,3 @@ T TaggedComponent::Tag() const template typename T::type_t TaggedComponent::type_counter(0); } // namespace plugin - -#endif diff --git a/src/probabilistic/BitVector.h b/src/probabilistic/BitVector.h index ecec6f5714..8e9333fd6e 100644 --- a/src/probabilistic/BitVector.h +++ b/src/probabilistic/BitVector.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PROBABILISTIC_BITVECTOR_H -#define PROBABILISTIC_BITVECTOR_H +#pragma once #include #include @@ -356,5 +355,3 @@ private: }; } - -#endif diff --git a/src/probabilistic/BloomFilter.h b/src/probabilistic/BloomFilter.h index bc22c91014..629605c6b6 100644 --- a/src/probabilistic/BloomFilter.h +++ b/src/probabilistic/BloomFilter.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PROBABILISTIC_BLOOMFILTER_H -#define PROBABILISTIC_BLOOMFILTER_H +#pragma once #include @@ -227,5 +226,3 @@ private: }; } - -#endif diff --git a/src/probabilistic/CardinalityCounter.h b/src/probabilistic/CardinalityCounter.h index 63047172ed..ec9397fd84 100644 --- a/src/probabilistic/CardinalityCounter.h +++ b/src/probabilistic/CardinalityCounter.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PROBABILISTIC_CARDINALITYCOUNTER_H -#define PROBABILISTIC_CARDINALITYCOUNTER_H +#pragma once #include #include @@ -186,5 +185,3 @@ private: }; } - -#endif diff --git a/src/probabilistic/CounterVector.h b/src/probabilistic/CounterVector.h index f8209fabca..3476b9f4e6 100644 --- a/src/probabilistic/CounterVector.h +++ b/src/probabilistic/CounterVector.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PROBABILISTIC_COUNTERVECTOR_H -#define PROBABILISTIC_COUNTERVECTOR_H +#pragma once #include #include @@ -154,5 +153,3 @@ private: }; } - -#endif diff --git a/src/probabilistic/Hasher.h b/src/probabilistic/Hasher.h index 3d60a264c0..6298b881f1 100644 --- a/src/probabilistic/Hasher.h +++ b/src/probabilistic/Hasher.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef PROBABILISTIC_HASHER_H -#define PROBABILISTIC_HASHER_H +#pragma once #include #include @@ -258,5 +257,3 @@ private: }; } - -#endif diff --git a/src/probabilistic/Topk.h b/src/probabilistic/Topk.h index a594b3c784..bb1e313346 100644 --- a/src/probabilistic/Topk.h +++ b/src/probabilistic/Topk.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef topk_h -#define topk_h +#pragma once #include #include "Val.h" @@ -173,5 +172,3 @@ private: }; }; - -#endif diff --git a/src/setsignal.h b/src/setsignal.h index b768ed031f..d290265373 100644 --- a/src/setsignal.h +++ b/src/setsignal.h @@ -2,8 +2,6 @@ * See the file "COPYING" in the main distribution directory for copyright. * */ -#ifndef setsignal_h -#define setsignal_h +#pragma once RETSIGTYPE (*setsignal(int, RETSIGTYPE (*)(int)))(int); -#endif diff --git a/src/siphash24.h b/src/siphash24.h index 0021d6f8e6..e557e10d9d 100644 --- a/src/siphash24.h +++ b/src/siphash24.h @@ -1,6 +1,5 @@ -#ifndef SIPHASH24_H -#define SIPHASH24_H +#pragma once #define SIPHASH_KEYLEN 16 #define SIPHASH_HASHLEN 8 @@ -14,5 +13,3 @@ inline void siphash(uint64_t* digest, const uint8_t *in, uint64_t inlen, const u { _siphash((uint8_t*)digest, in, inlen, key); } - -#endif diff --git a/src/threading/BasicThread.h b/src/threading/BasicThread.h index ea829fce54..d9c1b809b9 100644 --- a/src/threading/BasicThread.h +++ b/src/threading/BasicThread.h @@ -1,6 +1,5 @@ -#ifndef THREADING_BASICTHREAD_H -#define THREADING_BASICTHREAD_H +#pragma once #include @@ -214,5 +213,3 @@ private: }; } - -#endif diff --git a/src/threading/Formatter.h b/src/threading/Formatter.h index 53ca22254b..a3823d3a57 100644 --- a/src/threading/Formatter.h +++ b/src/threading/Formatter.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef THREADING_FORMATTER_H -#define THREADING_FORMATTER_H +#pragma once #include "../Desc.h" #include "MsgThread.h" @@ -160,5 +159,3 @@ private: }; }} - -#endif /* THREADING_FORMATTER_H */ diff --git a/src/threading/Manager.h b/src/threading/Manager.h index dce35cde3a..bf2cb429b4 100644 --- a/src/threading/Manager.h +++ b/src/threading/Manager.h @@ -1,6 +1,5 @@ -#ifndef THREADING_MANAGER_H -#define THREADING_MANAGER_H +#pragma once #include @@ -142,5 +141,3 @@ private: * called from Bro's main thread. */ extern threading::Manager* thread_mgr; - -#endif diff --git a/src/threading/MsgThread.h b/src/threading/MsgThread.h index 1a5834c021..70d6fafc6e 100644 --- a/src/threading/MsgThread.h +++ b/src/threading/MsgThread.h @@ -1,6 +1,5 @@ -#ifndef THREADING_MSGTHREAD_H -#define THREADING_MSGTHREAD_H +#pragma once #include "DebugLogger.h" @@ -436,6 +435,3 @@ private: }; } - - -#endif diff --git a/src/threading/Queue.h b/src/threading/Queue.h index 9ac9268a7a..4c3453d0c8 100644 --- a/src/threading/Queue.h +++ b/src/threading/Queue.h @@ -1,5 +1,4 @@ -#ifndef THREADING_QUEUE_H -#define THREADING_QUEUE_H +#pragma once #include #include @@ -260,5 +259,3 @@ inline void Queue::WakeUp() } } - -#endif diff --git a/src/threading/SerialTypes.h b/src/threading/SerialTypes.h index b9a9c6c718..dbd3635b94 100644 --- a/src/threading/SerialTypes.h +++ b/src/threading/SerialTypes.h @@ -1,6 +1,5 @@ -#ifndef THREADING_SERIALIZATIONTYPES_H -#define THREADING_SERIALIZATIONTYPES_H +#pragma once #include #include @@ -196,5 +195,3 @@ private: }; } - -#endif /* THREADING_SERIALIZATIONTYPES_H */ diff --git a/src/threading/formatters/Ascii.h b/src/threading/formatters/Ascii.h index d02b6a89c7..aecaf9ec8f 100644 --- a/src/threading/formatters/Ascii.h +++ b/src/threading/formatters/Ascii.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef THREADING_FORMATTERS_ASCII_H -#define THREADING_FORMATTERS_ASCII_H +#pragma once #include "../Formatter.h" @@ -59,5 +58,3 @@ private: }; }} - -#endif /* THREADING_FORMATTERS_ASCII_H */ diff --git a/src/threading/formatters/JSON.h b/src/threading/formatters/JSON.h index 8b9ab1ed6e..1015eb54c6 100644 --- a/src/threading/formatters/JSON.h +++ b/src/threading/formatters/JSON.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef THREADING_FORMATTERS_JSON_H -#define THREADING_FORMATTERS_JSON_H +#pragma once #include "../Formatter.h" #include "3rdparty/json.hpp" @@ -46,5 +45,3 @@ private: }; }} - -#endif /* THREADING_FORMATTERS_JSON_H */ diff --git a/src/util.h b/src/util.h index 77679caa18..f25605340e 100644 --- a/src/util.h +++ b/src/util.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef util_h -#define util_h +#pragma once #ifdef __GNUC__ #define ZEEK_DEPRECATED(msg) __attribute__ ((deprecated(msg))) @@ -580,5 +579,3 @@ std::unique_ptr build_unique (Args&&... args) { * @return the escaped string */ std::string json_escape_utf8(const std::string& val); - -#endif diff --git a/src/zeekygen/Configuration.h b/src/zeekygen/Configuration.h index 97ca125275..8829e5046d 100644 --- a/src/zeekygen/Configuration.h +++ b/src/zeekygen/Configuration.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_CONFIGURATION_H -#define ZEEKYGEN_CONFIGURATION_H +#pragma once #include "Info.h" #include "Target.h" @@ -59,5 +58,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/IdentifierInfo.h b/src/zeekygen/IdentifierInfo.h index 5457772c52..1860c0f25a 100644 --- a/src/zeekygen/IdentifierInfo.h +++ b/src/zeekygen/IdentifierInfo.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_IDENTIFIERINFO_H -#define ZEEKYGEN_IDENTIFIERINFO_H +#pragma once #include "Info.h" #include "ScriptInfo.h" @@ -187,5 +186,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/Info.h b/src/zeekygen/Info.h index f6e09cb498..0f300a7682 100644 --- a/src/zeekygen/Info.h +++ b/src/zeekygen/Info.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_INFO_H -#define ZEEKYGEN_INFO_H +#pragma once #include #include @@ -69,5 +68,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/Manager.h b/src/zeekygen/Manager.h index 99c6b353cc..1f988c880b 100644 --- a/src/zeekygen/Manager.h +++ b/src/zeekygen/Manager.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_MANAGER_H -#define ZEEKYGEN_MANAGER_H +#pragma once #include "Configuration.h" #include "Info.h" @@ -264,5 +263,3 @@ bool Manager::IsUpToDate(const string& target_file, } // namespace zeekygen extern zeekygen::Manager* zeekygen_mgr; - -#endif diff --git a/src/zeekygen/PackageInfo.h b/src/zeekygen/PackageInfo.h index 044abd88e7..00be437bac 100644 --- a/src/zeekygen/PackageInfo.h +++ b/src/zeekygen/PackageInfo.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_PACKAGEINFO_H -#define ZEEKYGEN_PACKAGEINFO_H +#pragma once #include "Info.h" @@ -46,5 +45,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/ReStructuredTextTable.h b/src/zeekygen/ReStructuredTextTable.h index aefa8aaa26..39381d79d0 100644 --- a/src/zeekygen/ReStructuredTextTable.h +++ b/src/zeekygen/ReStructuredTextTable.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_RESTTABLE_H -#define ZEEKYGEN_RESTTABLE_H +#pragma once #include #include @@ -49,5 +48,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/ScriptInfo.h b/src/zeekygen/ScriptInfo.h index 8567111b5e..153fb0e54c 100644 --- a/src/zeekygen/ScriptInfo.h +++ b/src/zeekygen/ScriptInfo.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_SCRIPTINFO_H -#define ZEEKYGEN_SCRIPTINFO_H +#pragma once #include "Info.h" #include "IdentifierInfo.h" @@ -120,5 +119,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/Target.h b/src/zeekygen/Target.h index 4062f8a788..9d18f6e4c5 100644 --- a/src/zeekygen/Target.h +++ b/src/zeekygen/Target.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_TARGET_H -#define ZEEKYGEN_TARGET_H +#pragma once #include "Info.h" #include "PackageInfo.h" @@ -385,5 +384,3 @@ private: }; } // namespace zeekygen - -#endif diff --git a/src/zeekygen/utils.h b/src/zeekygen/utils.h index 07430f66ba..27975207a3 100644 --- a/src/zeekygen/utils.h +++ b/src/zeekygen/utils.h @@ -1,7 +1,6 @@ // See the file "COPYING" in the main distribution directory for copyright. -#ifndef ZEEKYGEN_UTILS_H -#define ZEEKYGEN_UTILS_H +#pragma once #include "ID.h" @@ -63,5 +62,3 @@ bool is_all_whitespace(const std::string& s); std::string redef_indication(const std::string& from_script); } // namespace zeekygen - -#endif diff --git a/testing/btest/plugins/file-plugin/src/Foo.h b/testing/btest/plugins/file-plugin/src/Foo.h index eaadbc7876..e8fb217e4c 100644 --- a/testing/btest/plugins/file-plugin/src/Foo.h +++ b/testing/btest/plugins/file-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include #include @@ -19,5 +18,3 @@ protected: }; } } - -#endif diff --git a/testing/btest/plugins/hooks-plugin/src/Plugin.h b/testing/btest/plugins/hooks-plugin/src/Plugin.h index 1192304976..9319663e70 100644 --- a/testing/btest/plugins/hooks-plugin/src/Plugin.h +++ b/testing/btest/plugins/hooks-plugin/src/Plugin.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_Demo_Hooks -#define BRO_PLUGIN_Demo_Hooks +#pragma once #include @@ -32,5 +31,3 @@ extern Plugin plugin; } } - -#endif diff --git a/testing/btest/plugins/legacy-plugin/src/Foo.h b/testing/btest/plugins/legacy-plugin/src/Foo.h index e12fed889d..f68aa3814d 100644 --- a/testing/btest/plugins/legacy-plugin/src/Foo.h +++ b/testing/btest/plugins/legacy-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/pia/PIA.h" @@ -28,5 +27,3 @@ protected: }; } } - -#endif diff --git a/testing/btest/plugins/logging-hooks-plugin/src/Plugin.h b/testing/btest/plugins/logging-hooks-plugin/src/Plugin.h index 12b821c22c..583c344e4a 100644 --- a/testing/btest/plugins/logging-hooks-plugin/src/Plugin.h +++ b/testing/btest/plugins/logging-hooks-plugin/src/Plugin.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_Log_Hooks -#define BRO_PLUGIN_Log_Hooks +#pragma once #include @@ -24,5 +23,3 @@ extern Plugin plugin; } } - -#endif diff --git a/testing/btest/plugins/pktdumper-plugin/src/Foo.h b/testing/btest/plugins/pktdumper-plugin/src/Foo.h index b8c8291728..57307e1b77 100644 --- a/testing/btest/plugins/pktdumper-plugin/src/Foo.h +++ b/testing/btest/plugins/pktdumper-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include #include @@ -26,5 +25,3 @@ private: } } - -#endif diff --git a/testing/btest/plugins/pktsrc-plugin/src/Foo.h b/testing/btest/plugins/pktsrc-plugin/src/Foo.h index 922b300b61..7896440229 100644 --- a/testing/btest/plugins/pktsrc-plugin/src/Foo.h +++ b/testing/btest/plugins/pktsrc-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include #include @@ -30,5 +29,3 @@ private: } } - -#endif diff --git a/testing/btest/plugins/protocol-plugin/src/Foo.h b/testing/btest/plugins/protocol-plugin/src/Foo.h index e12fed889d..f68aa3814d 100644 --- a/testing/btest/plugins/protocol-plugin/src/Foo.h +++ b/testing/btest/plugins/protocol-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/pia/PIA.h" @@ -28,5 +27,3 @@ protected: }; } } - -#endif diff --git a/testing/btest/plugins/reader-plugin/src/Foo.h b/testing/btest/plugins/reader-plugin/src/Foo.h index 490b209191..9e7fa133ae 100644 --- a/testing/btest/plugins/reader-plugin/src/Foo.h +++ b/testing/btest/plugins/reader-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include "input/ReaderBackend.h" #include "threading/formatters/Ascii.h" @@ -30,5 +29,3 @@ private: }; } } - -#endif diff --git a/testing/btest/plugins/reader-plugin/src/Plugin.h b/testing/btest/plugins/reader-plugin/src/Plugin.h index c65eac01a1..01c089953e 100644 --- a/testing/btest/plugins/reader-plugin/src/Plugin.h +++ b/testing/btest/plugins/reader-plugin/src/Plugin.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO -#define BRO_PLUGIN_DEMO_FOO +#pragma once #include @@ -18,5 +17,3 @@ extern Plugin plugin; } } - -#endif diff --git a/testing/btest/plugins/reporter-hook-plugin/src/Plugin.h b/testing/btest/plugins/reporter-hook-plugin/src/Plugin.h index 2e793aba08..3bd64c9b07 100644 --- a/testing/btest/plugins/reporter-hook-plugin/src/Plugin.h +++ b/testing/btest/plugins/reporter-hook-plugin/src/Plugin.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_Reporter_Hook -#define BRO_PLUGIN_Reporter_Hook +#pragma once #include @@ -23,5 +22,3 @@ extern Plugin plugin; } } - -#endif diff --git a/testing/btest/plugins/writer-plugin/src/Foo.h b/testing/btest/plugins/writer-plugin/src/Foo.h index 8710863990..64ca166b63 100644 --- a/testing/btest/plugins/writer-plugin/src/Foo.h +++ b/testing/btest/plugins/writer-plugin/src/Foo.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO_H -#define BRO_PLUGIN_DEMO_FOO_H +#pragma once #include "logging/WriterBackend.h" #include "threading/formatters/Ascii.h" @@ -35,5 +34,3 @@ private: }; } } - -#endif diff --git a/testing/btest/plugins/writer-plugin/src/Plugin.h b/testing/btest/plugins/writer-plugin/src/Plugin.h index c65eac01a1..01c089953e 100644 --- a/testing/btest/plugins/writer-plugin/src/Plugin.h +++ b/testing/btest/plugins/writer-plugin/src/Plugin.h @@ -1,6 +1,5 @@ -#ifndef BRO_PLUGIN_DEMO_FOO -#define BRO_PLUGIN_DEMO_FOO +#pragma once #include @@ -18,5 +17,3 @@ extern Plugin plugin; } } - -#endif