xt_pknock: use IS_ENABLED

It is more succinct than checking whether CONFIG_BLAH or
CONFIG_BLAH_MODULE are defined.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
Jeremy Sowden
2020-10-25 14:15:56 +01:00
committed by Jan Engelhardt
parent 63fb5d3490
commit b3a3f2e91b

View File

@@ -677,7 +677,7 @@ static bool
msg_to_userspace_nl(const struct xt_pknock_mtinfo *info, msg_to_userspace_nl(const struct xt_pknock_mtinfo *info,
const struct peer *peer, int multicast_group) const struct peer *peer, int multicast_group)
{ {
#if defined(CONFIG_CONNECTOR) || defined(CONFIG_CONNECTOR_MODULE) #if IS_ENABLED(CONFIG_CONNECTOR)
struct cn_msg *m; struct cn_msg *m;
struct xt_pknock_nl_msg msg; struct xt_pknock_nl_msg msg;
@@ -1101,7 +1101,7 @@ static struct xt_match xt_pknock_mt_reg __read_mostly = {
static int __init xt_pknock_mt_init(void) static int __init xt_pknock_mt_init(void)
{ {
#if !defined(CONFIG_CONNECTOR) && !defined(CONFIG_CONNECTOR_MODULE) #if !IS_ENABLED(CONFIG_CONNECTOR)
if (nl_multicast_group != -1) if (nl_multicast_group != -1)
pr_info("CONFIG_CONNECTOR not present; " pr_info("CONFIG_CONNECTOR not present; "
"netlink messages disabled\n"); "netlink messages disabled\n");