Skip to content

Commit

Permalink
doc: Fix typos in endif header comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Nov 16, 2021
1 parent ad09c28 commit fa44237
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build_msvc/libsecp256k1_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
#define ECMULT_GEN_PREC_BITS 4
#define ECMULT_WINDOW_SIZE 15

#endif /* BITCOIN_LIBSECP256K1_CONFIG_H */
#endif // BITCOIN_LIBSECP256K1_CONFIG_H
2 changes: 1 addition & 1 deletion src/banman.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ class BanMan
CRollingBloomFilter m_discouraged GUARDED_BY(m_cs_banned) {50000, 0.000001};
};

#endif
#endif // BITCOIN_BANMAN_H
2 changes: 1 addition & 1 deletion src/consensus/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ static constexpr CAmount COIN = 100000000;
static constexpr CAmount MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

#endif // BITCOIN_CONSENSUS_AMOUNT_H
#endif // BITCOIN_CONSENSUS_AMOUNT_H
2 changes: 1 addition & 1 deletion src/httprpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ void InterruptREST();
*/
void StopREST();

#endif
#endif // BITCOIN_HTTPRPC_H
2 changes: 1 addition & 1 deletion src/i2p.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,4 @@ class Session
} // namespace sam
} // namespace i2p

#endif /* BITCOIN_I2P_H */
#endif // BITCOIN_I2P_H
2 changes: 1 addition & 1 deletion src/policy/feerate.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ class CFeeRate
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
};

#endif // BITCOIN_POLICY_FEERATE_H
#endif // BITCOIN_POLICY_FEERATE_H
2 changes: 1 addition & 1 deletion src/randomenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ void RandAddDynamicEnv(CSHA512& hasher);
/** Gather non-cryptographic environment data that does not change over time. */
void RandAddStaticEnv(CSHA512& hasher);

#endif
#endif // BITCOIN_RANDOMENV_H
2 changes: 1 addition & 1 deletion src/rpc/blockchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ CBlockPolicyEstimator& EnsureAnyFeeEstimator(const std::any& context);
*/
UniValue CreateUTXOSnapshot(NodeContext& node, CChainState& chainstate, CAutoFile& afile);

#endif
#endif // BITCOIN_RPC_BLOCKCHAIN_H
2 changes: 1 addition & 1 deletion src/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ class SingleThreadedSchedulerClient
size_t CallbacksPending();
};

#endif
#endif // BITCOIN_SCHEDULER_H
2 changes: 1 addition & 1 deletion src/shutdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ bool ShutdownRequested();
*/
void WaitForShutdown();

#endif
#endif // BITCOIN_SHUTDOWN_H
2 changes: 1 addition & 1 deletion src/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,4 @@ template <typename T> constexpr auto UCharSpanCast(Span<T> s) -> Span<typename s
/** Like MakeSpan, but for (const) unsigned char member types only. Only works for (un)signed char containers. */
template <typename V> constexpr auto MakeUCharSpan(V&& v) -> decltype(UCharSpanCast(MakeSpan(std::forward<V>(v)))) { return UCharSpanCast(MakeSpan(std::forward<V>(v))); }

#endif
#endif // BITCOIN_SPAN_H
2 changes: 1 addition & 1 deletion src/test/scriptnum10.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ class CScriptNum10
};


#endif // BITCOIN_TEST_BIGNUM_H
#endif // BITCOIN_TEST_SCRIPTNUM10_H
2 changes: 1 addition & 1 deletion src/test/util/setup_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,4 @@ class HasReason
const std::string m_reason;
};

#endif
#endif // BITCOIN_TEST_UTIL_SETUP_COMMON_H
2 changes: 1 addition & 1 deletion src/threadinterrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ class CThreadInterrupt
std::atomic<bool> flag;
};

#endif //BITCOIN_THREADINTERRUPT_H
#endif // BITCOIN_THREADINTERRUPT_H
2 changes: 1 addition & 1 deletion src/torcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ class TorController
static void reconnect_cb(evutil_socket_t fd, short what, void *arg);
};

#endif /* BITCOIN_TORCONTROL_H */
#endif // BITCOIN_TORCONTROL_H
2 changes: 1 addition & 1 deletion src/util/readwritefile.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ std::pair<bool,std::string> ReadBinaryFile(const fs::path &filename, size_t maxs
*/
bool WriteBinaryFile(const fs::path &filename, const std::string &data);

#endif /* BITCOIN_UTIL_READWRITEFILE_H */
#endif // BITCOIN_UTIL_READWRITEFILE_H
2 changes: 1 addition & 1 deletion src/util/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ template <typename T1, size_t PREFIX_LEN>
std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
}

#endif // BITCOIN_UTIL_STRENCODINGS_H
#endif // BITCOIN_UTIL_STRING_H
2 changes: 1 addition & 1 deletion src/util/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
#endif


#endif /* BITCOIN_UTIL_TRACE_H */
#endif // BITCOIN_UTIL_TRACE_H
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ const LegacyScriptPubKeyMan& EnsureConstLegacyScriptPubKeyMan(const CWallet& wal

RPCHelpMan getaddressinfo();
RPCHelpMan signrawtransactionwithwallet();
#endif //BITCOIN_WALLET_RPCWALLET_H
#endif // BITCOIN_WALLET_RPCWALLET_H
2 changes: 1 addition & 1 deletion src/warnings.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ void SetfLargeWorkInvalidChainFound(bool flag);
*/
bilingual_str GetWarnings(bool verbose);

#endif // BITCOIN_WARNINGS_H
#endif // BITCOIN_WARNINGS_H
2 changes: 1 addition & 1 deletion src/zmq/zmqrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class CRPCTable;

void RegisterZMQRPCCommands(CRPCTable& t);

#endif // BITCOIN_ZMQ_ZMRRPC_H
#endif // BITCOIN_ZMQ_ZMQRPC_H
2 changes: 1 addition & 1 deletion test/lint/lint-include-guards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for HEADER_FILE in $(git ls-files -- "*.h" | grep -vE "^${REGEXP_EXCLUDE_FILES_W
do
HEADER_ID_BASE=$(cut -f2- -d/ <<< "${HEADER_FILE}" | sed "s/\.h$//g" | tr / _ | tr - _ | tr "[:lower:]" "[:upper:]")
HEADER_ID="${HEADER_ID_PREFIX}${HEADER_ID_BASE}${HEADER_ID_SUFFIX}"
if [[ $(grep -cE "^#(ifndef|define) ${HEADER_ID}" "${HEADER_FILE}") != 2 ]]; then
if [[ $(grep --count --extended-regexp "^#(ifndef|define|endif //) ${HEADER_ID}" "${HEADER_FILE}") != 3 ]]; then
echo "${HEADER_FILE} seems to be missing the expected include guard:"
echo " #ifndef ${HEADER_ID}"
echo " #define ${HEADER_ID}"
Expand Down

0 comments on commit fa44237

Please sign in to comment.